SAP ALE_QUOTATION_CREATEFROMDATA2 Function Module for BAPI -> IDoc: ALE_QUOTATION_CREATEFROMDATA2
ALE_QUOTATION_CREATEFROMDATA2 is a standard ale quotation createfromdata2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI -> IDoc: ALE_QUOTATION_CREATEFROMDATA2 processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ale quotation createfromdata2 FM, simply by entering the name ALE_QUOTATION_CREATEFROMDATA2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: 2031
Program Name: SAPL2031
Main Program: SAPL2031
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ALE_QUOTATION_CREATEFROMDATA2 pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'ALE_QUOTATION_CREATEFROMDATA2'"BAPI -> IDoc: ALE_QUOTATION_CREATEFROMDATA2.
EXPORTING
* SALESDOCUMENTIN = "Quotation Number
* CONVERT = ' ' "Conversion of Partner Function and Order Type
* OBJ_TYPE = 'BUS2031' "
* SERIAL_ID = '0' "
QUOTATIONHEADERIN = "
* QUOTATIONHEADERINX = "
* SENDER = "Logical System - Sender
* BINARYRELATIONSHIPTYPE = ' ' "
* INTNUMBERASSIGNMENT = ' ' "
* BEHAVEWHENERROR = ' ' "
* LOGICSWITCH = "
* TESTRUN = "Test Run
TABLES
* QUOTATIONITEMSIN = "
* QUOTATIONCFGSPARTOF = "
* QUOTATIONCFGSVALUE = "
* QUOTATIONCFGSBLOB = "
* QUOTATIONCFGSVK = "
* QUOTATIONCFGSREFINST = "
* QUOTATIONKEYS = "
* QUOTATIONTEXT = "
* EXTENSIONIN = "Customer Enhancement for VBAK, VBAP, VBEP
* PARTNERADDRESSES = "BAPI Reference Structure for Addresses (Org./Company)
RECEIVERS = "
* QUOTATIONITEMSINX = "
* COMMUNICATION_DOCUMENTS = "
* APPLICATION_OBJECTS = "
QUOTATIONPARTNERS = "
* QUOTATIONSCHEDULESIN = "
* QUOTATIONSCHEDULESINX = "
* QUOTATIONCONDITIONSIN = "
* QUOTATIONCONDITIONSINX = "
* QUOTATIONCFGSREF = "
* QUOTATIONCFGSINST = "
EXCEPTIONS
ERROR_CREATING_IDOCS = 1
IMPORTING Parameters details for ALE_QUOTATION_CREATEFROMDATA2
SALESDOCUMENTIN - Quotation Number
Data type: BAPIVBELN-VBELNOptional: Yes
Call by Reference: No ( called with pass by value option)
CONVERT - Conversion of Partner Function and Order Type
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJ_TYPE -
Data type: SERIAL-OBJ_TYPEDefault: 'BUS2031'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SERIAL_ID -
Data type: SERIAL-CHNUMDefault: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONHEADERIN -
Data type: BAPISDHD1Optional: No
Call by Reference: No ( called with pass by value option)
QUOTATIONHEADERINX -
Data type: BAPISDHD1XOptional: Yes
Call by Reference: No ( called with pass by value option)
SENDER - Logical System - Sender
Data type: BAPI_SENDEROptional: Yes
Call by Reference: No ( called with pass by value option)
BINARYRELATIONSHIPTYPE -
Data type: BAPIRELTYPE-RELTYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
INTNUMBERASSIGNMENT -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEHAVEWHENERROR -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOGICSWITCH -
Data type: BAPISDLSOptional: Yes
Call by Reference: No ( called with pass by value option)
TESTRUN - Test Run
Data type: BAPIFLAG-BAPIFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ALE_QUOTATION_CREATEFROMDATA2
QUOTATIONITEMSIN -
Data type: BAPISDITMOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSPARTOF -
Data type: BAPICUPRTOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSVALUE -
Data type: BAPICUVALOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSBLOB -
Data type: BAPICUBLBOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSVK -
Data type: BAPICUVKOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSREFINST -
Data type: BAPICUREFOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONKEYS -
Data type: BAPISDKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONTEXT -
Data type: BAPISDTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXTENSIONIN - Customer Enhancement for VBAK, VBAP, VBEP
Data type: BAPIPAREXOptional: Yes
Call by Reference: No ( called with pass by value option)
PARTNERADDRESSES - BAPI Reference Structure for Addresses (Org./Company)
Data type: BAPIADDR1Optional: Yes
Call by Reference: No ( called with pass by value option)
RECEIVERS -
Data type: BDI_LOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
QUOTATIONITEMSINX -
Data type: BAPISDITMXOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMUNICATION_DOCUMENTS -
Data type: SWOTOBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
APPLICATION_OBJECTS -
Data type: SWOTOBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONPARTNERS -
Data type: BAPIPARNROptional: No
Call by Reference: No ( called with pass by value option)
QUOTATIONSCHEDULESIN -
Data type: BAPISCHDLOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONSCHEDULESINX -
Data type: BAPISCHDLXOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCONDITIONSIN -
Data type: BAPICONDOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCONDITIONSINX -
Data type: BAPICONDXOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSREF -
Data type: BAPICUCFGOptional: Yes
Call by Reference: No ( called with pass by value option)
QUOTATIONCFGSINST -
Data type: BAPICUINSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_CREATING_IDOCS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ALE_QUOTATION_CREATEFROMDATA2 Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_salesdocumentin | TYPE BAPIVBELN-VBELN, " | |||
| lt_quotationitemsin | TYPE STANDARD TABLE OF BAPISDITM, " | |||
| lv_error_creating_idocs | TYPE BAPISDITM, " | |||
| lv_convert | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_quotationcfgspartof | TYPE STANDARD TABLE OF BAPICUPRT, " | |||
| lv_obj_type | TYPE SERIAL-OBJ_TYPE, " 'BUS2031' | |||
| lt_quotationcfgsvalue | TYPE STANDARD TABLE OF BAPICUVAL, " | |||
| lv_serial_id | TYPE SERIAL-CHNUM, " '0' | |||
| lt_quotationcfgsblob | TYPE STANDARD TABLE OF BAPICUBLB, " | |||
| lt_quotationcfgsvk | TYPE STANDARD TABLE OF BAPICUVK, " | |||
| lt_quotationcfgsrefinst | TYPE STANDARD TABLE OF BAPICUREF, " | |||
| lt_quotationkeys | TYPE STANDARD TABLE OF BAPISDKEY, " | |||
| lt_quotationtext | TYPE STANDARD TABLE OF BAPISDTEXT, " | |||
| lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_partneraddresses | TYPE STANDARD TABLE OF BAPIADDR1, " | |||
| lt_receivers | TYPE STANDARD TABLE OF BDI_LOGSYS, " | |||
| lv_quotationheaderin | TYPE BAPISDHD1, " | |||
| lt_quotationitemsinx | TYPE STANDARD TABLE OF BAPISDITMX, " | |||
| lt_communication_documents | TYPE STANDARD TABLE OF SWOTOBJID, " | |||
| lt_application_objects | TYPE STANDARD TABLE OF SWOTOBJID, " | |||
| lt_quotationpartners | TYPE STANDARD TABLE OF BAPIPARNR, " | |||
| lv_quotationheaderinx | TYPE BAPISDHD1X, " | |||
| lv_sender | TYPE BAPI_SENDER, " | |||
| lt_quotationschedulesin | TYPE STANDARD TABLE OF BAPISCHDL, " | |||
| lt_quotationschedulesinx | TYPE STANDARD TABLE OF BAPISCHDLX, " | |||
| lv_binaryrelationshiptype | TYPE BAPIRELTYPE-RELTYPE, " SPACE | |||
| lv_intnumberassignment | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_quotationconditionsin | TYPE STANDARD TABLE OF BAPICOND, " | |||
| lv_behavewhenerror | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_quotationconditionsinx | TYPE STANDARD TABLE OF BAPICONDX, " | |||
| lv_logicswitch | TYPE BAPISDLS, " | |||
| lt_quotationcfgsref | TYPE STANDARD TABLE OF BAPICUCFG, " | |||
| lv_testrun | TYPE BAPIFLAG-BAPIFLAG, " | |||
| lt_quotationcfgsinst | TYPE STANDARD TABLE OF BAPICUINS. " |
|   CALL FUNCTION 'ALE_QUOTATION_CREATEFROMDATA2' "BAPI -> IDoc: ALE_QUOTATION_CREATEFROMDATA2 |
| EXPORTING | ||
| SALESDOCUMENTIN | = lv_salesdocumentin | |
| CONVERT | = lv_convert | |
| OBJ_TYPE | = lv_obj_type | |
| SERIAL_ID | = lv_serial_id | |
| QUOTATIONHEADERIN | = lv_quotationheaderin | |
| QUOTATIONHEADERINX | = lv_quotationheaderinx | |
| SENDER | = lv_sender | |
| BINARYRELATIONSHIPTYPE | = lv_binaryrelationshiptype | |
| INTNUMBERASSIGNMENT | = lv_intnumberassignment | |
| BEHAVEWHENERROR | = lv_behavewhenerror | |
| LOGICSWITCH | = lv_logicswitch | |
| TESTRUN | = lv_testrun | |
| TABLES | ||
| QUOTATIONITEMSIN | = lt_quotationitemsin | |
| QUOTATIONCFGSPARTOF | = lt_quotationcfgspartof | |
| QUOTATIONCFGSVALUE | = lt_quotationcfgsvalue | |
| QUOTATIONCFGSBLOB | = lt_quotationcfgsblob | |
| QUOTATIONCFGSVK | = lt_quotationcfgsvk | |
| QUOTATIONCFGSREFINST | = lt_quotationcfgsrefinst | |
| QUOTATIONKEYS | = lt_quotationkeys | |
| QUOTATIONTEXT | = lt_quotationtext | |
| EXTENSIONIN | = lt_extensionin | |
| PARTNERADDRESSES | = lt_partneraddresses | |
| RECEIVERS | = lt_receivers | |
| QUOTATIONITEMSINX | = lt_quotationitemsinx | |
| COMMUNICATION_DOCUMENTS | = lt_communication_documents | |
| APPLICATION_OBJECTS | = lt_application_objects | |
| QUOTATIONPARTNERS | = lt_quotationpartners | |
| QUOTATIONSCHEDULESIN | = lt_quotationschedulesin | |
| QUOTATIONSCHEDULESINX | = lt_quotationschedulesinx | |
| QUOTATIONCONDITIONSIN | = lt_quotationconditionsin | |
| QUOTATIONCONDITIONSINX | = lt_quotationconditionsinx | |
| QUOTATIONCFGSREF | = lt_quotationcfgsref | |
| QUOTATIONCFGSINST | = lt_quotationcfgsinst | |
| EXCEPTIONS | ||
| ERROR_CREATING_IDOCS = 1 | ||
| . " ALE_QUOTATION_CREATEFROMDATA2 | ||
ABAP code using 7.40 inline data declarations to call FM ALE_QUOTATION_CREATEFROMDATA2
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single VBELN FROM BAPIVBELN INTO @DATA(ld_salesdocumentin). | ||||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_convert). | ||||
| DATA(ld_convert) | = ' '. | |||
| "SELECT single OBJ_TYPE FROM SERIAL INTO @DATA(ld_obj_type). | ||||
| DATA(ld_obj_type) | = 'BUS2031'. | |||
| "SELECT single CHNUM FROM SERIAL INTO @DATA(ld_serial_id). | ||||
| DATA(ld_serial_id) | = '0'. | |||
| "SELECT single RELTYPE FROM BAPIRELTYPE INTO @DATA(ld_binaryrelationshiptype). | ||||
| DATA(ld_binaryrelationshiptype) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_intnumberassignment). | ||||
| DATA(ld_intnumberassignment) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_behavewhenerror). | ||||
| DATA(ld_behavewhenerror) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_testrun). | ||||
Search for further information about these or an SAP related objects