SAP ALE_SAG_GETDETAIL Function Module for BAPI -> IDoc: ALE_SAG_GETDETAIL
ALE_SAG_GETDETAIL is a standard ale sag getdetail 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_SAG_GETDETAIL 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 sag getdetail FM, simply by entering the name ALE_SAG_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: 2013
Program Name: SAPL2013
Main Program: SAPL2013
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ALE_SAG_GETDETAIL 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_SAG_GETDETAIL'"BAPI -> IDoc: ALE_SAG_GETDETAIL.
EXPORTING
PURCHASINGDOCUMENT = "Purchasing Document Number
* PARTNERDATA = ' ' "
* OBJ_TYPE = 'BUS2013' "
* SERIAL_ID = '0' "
* ITEMDATA = 'X' "
* ACCOUNTDATA = ' ' "
* SCHEDULEDATA = ' ' "
* SHIPPINGDATA = ' ' "
* SCCOMPONENTDATA = ' ' "
* EXPORTDATA = ' ' "
* CONDITIONDATA = ' ' "
* TEXTDATA = ' ' "
TABLES
* ITEM = "Item Data of Contract
* SHIPPING = "Shipping Data
* EXPORTIMPORT = "
* ITEMTEXT = "
* HEADERTEXT = "
* HEADCONDVALIDITY = "
* HEADCONDITION = "
* HEADCONDSCALEVAL = "
* HEADCONDSCALEQUAN = "
* PARTNER = "Partner Information for Outline Agreement
* EXTENSIONOUT = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* ACCOUNT = "Account Assignment Data - Outline Agreement
RECEIVERS = "
* COMMUNICATION_DOCUMENTS = "
* APPLICATION_OBJECTS = "
* SCHEDULE = "Delivery Schedule Line Data Outline Agreement
* DELIVERYADDRESS = "
* SCCOMPONENT = "
* ITEMCONDVALIDITY = "
* ITEMCONDSCALEVALUE = "
* ITEMCONDSCALEQUAN = "
* ITEMCONDITION = "
EXCEPTIONS
ERROR_CREATING_IDOCS = 1
IMPORTING Parameters details for ALE_SAG_GETDETAIL
PURCHASINGDOCUMENT - Purchasing Document Number
Data type: BAPIMEOUTHEADER-NUMBEROptional: No
Call by Reference: No ( called with pass by value option)
PARTNERDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJ_TYPE -
Data type: SERIAL-OBJ_TYPEDefault: 'BUS2013'
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)
ITEMDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNTDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SCHEDULEDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHIPPINGDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SCCOMPONENTDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONDITIONDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXTDATA -
Data type: BAPIFLAG-BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ALE_SAG_GETDETAIL
ITEM - Item Data of Contract
Data type: BAPIMEOUTITEMOptional: Yes
Call by Reference: No ( called with pass by value option)
SHIPPING - Shipping Data
Data type: BAPIMEPOSHIPPEXPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTIMPORT -
Data type: BAPIMEOUTEIPOOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEMTEXT -
Data type: BAPIMEOUTITEMTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADERTEXT -
Data type: BAPIMEOUTTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADCONDVALIDITY -
Data type: BAPIMEOUTHEADVALIDITYOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADCONDITION -
Data type: BAPIMEOUTHEADERCONDOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADCONDSCALEVAL -
Data type: BAPIMEOUTSCALEVALUEOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADCONDSCALEQUAN -
Data type: BAPIMEOUTSCALEOptional: Yes
Call by Reference: No ( called with pass by value option)
PARTNER - Partner Information for Outline Agreement
Data type: BAPIMEOUTPARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
EXTENSIONOUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNT - Account Assignment Data - Outline Agreement
Data type: BAPIMEOUTACCOUNTOptional: 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)
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)
SCHEDULE - Delivery Schedule Line Data Outline Agreement
Data type: BAPIMEOUTSCHEDULEOptional: Yes
Call by Reference: No ( called with pass by value option)
DELIVERYADDRESS -
Data type: BAPIMEOUTADDRDELIVERYOptional: Yes
Call by Reference: No ( called with pass by value option)
SCCOMPONENT -
Data type: BAPIMEOUTCOMPONENTOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEMCONDVALIDITY -
Data type: BAPIMEOUTVALIDITYOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEMCONDSCALEVALUE -
Data type: BAPIMEOUTITEMSCALEVALOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEMCONDSCALEQUAN -
Data type: BAPIMEOUTITEMSCALEQUANOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEMCONDITION -
Data type: BAPIMEOUTCONDITIONOptional: 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_SAG_GETDETAIL 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: | ||||
| lt_item | TYPE STANDARD TABLE OF BAPIMEOUTITEM, " | |||
| lv_purchasingdocument | TYPE BAPIMEOUTHEADER-NUMBER, " | |||
| lv_error_creating_idocs | TYPE BAPIMEOUTHEADER, " | |||
| lt_shipping | TYPE STANDARD TABLE OF BAPIMEPOSHIPPEXP, " | |||
| lv_partnerdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lv_obj_type | TYPE SERIAL-OBJ_TYPE, " 'BUS2013' | |||
| lt_exportimport | TYPE STANDARD TABLE OF BAPIMEOUTEIPO, " | |||
| lt_itemtext | TYPE STANDARD TABLE OF BAPIMEOUTITEMTEXT, " | |||
| lv_serial_id | TYPE SERIAL-CHNUM, " '0' | |||
| lt_headertext | TYPE STANDARD TABLE OF BAPIMEOUTTEXT, " | |||
| lt_headcondvalidity | TYPE STANDARD TABLE OF BAPIMEOUTHEADVALIDITY, " | |||
| lt_headcondition | TYPE STANDARD TABLE OF BAPIMEOUTHEADERCOND, " | |||
| lt_headcondscaleval | TYPE STANDARD TABLE OF BAPIMEOUTSCALEVALUE, " | |||
| lt_headcondscalequan | TYPE STANDARD TABLE OF BAPIMEOUTSCALE, " | |||
| lt_partner | TYPE STANDARD TABLE OF BAPIMEOUTPARTNER, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_account | TYPE STANDARD TABLE OF BAPIMEOUTACCOUNT, " | |||
| lv_itemdata | TYPE BAPIFLAG-BAPIFLAG, " 'X' | |||
| lt_receivers | TYPE STANDARD TABLE OF BDI_LOGSYS, " | |||
| lt_communication_documents | TYPE STANDARD TABLE OF SWOTOBJID, " | |||
| lt_application_objects | TYPE STANDARD TABLE OF SWOTOBJID, " | |||
| lt_schedule | TYPE STANDARD TABLE OF BAPIMEOUTSCHEDULE, " | |||
| lv_accountdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lv_scheduledata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_deliveryaddress | TYPE STANDARD TABLE OF BAPIMEOUTADDRDELIVERY, " | |||
| lt_sccomponent | TYPE STANDARD TABLE OF BAPIMEOUTCOMPONENT, " | |||
| lv_shippingdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lv_sccomponentdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_itemcondvalidity | TYPE STANDARD TABLE OF BAPIMEOUTVALIDITY, " | |||
| lv_exportdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_itemcondscalevalue | TYPE STANDARD TABLE OF BAPIMEOUTITEMSCALEVAL, " | |||
| lv_conditiondata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_itemcondscalequan | TYPE STANDARD TABLE OF BAPIMEOUTITEMSCALEQUAN, " | |||
| lv_textdata | TYPE BAPIFLAG-BAPIFLAG, " SPACE | |||
| lt_itemcondition | TYPE STANDARD TABLE OF BAPIMEOUTCONDITION. " |
|   CALL FUNCTION 'ALE_SAG_GETDETAIL' "BAPI -> IDoc: ALE_SAG_GETDETAIL |
| EXPORTING | ||
| PURCHASINGDOCUMENT | = lv_purchasingdocument | |
| PARTNERDATA | = lv_partnerdata | |
| OBJ_TYPE | = lv_obj_type | |
| SERIAL_ID | = lv_serial_id | |
| ITEMDATA | = lv_itemdata | |
| ACCOUNTDATA | = lv_accountdata | |
| SCHEDULEDATA | = lv_scheduledata | |
| SHIPPINGDATA | = lv_shippingdata | |
| SCCOMPONENTDATA | = lv_sccomponentdata | |
| EXPORTDATA | = lv_exportdata | |
| CONDITIONDATA | = lv_conditiondata | |
| TEXTDATA | = lv_textdata | |
| TABLES | ||
| ITEM | = lt_item | |
| SHIPPING | = lt_shipping | |
| EXPORTIMPORT | = lt_exportimport | |
| ITEMTEXT | = lt_itemtext | |
| HEADERTEXT | = lt_headertext | |
| HEADCONDVALIDITY | = lt_headcondvalidity | |
| HEADCONDITION | = lt_headcondition | |
| HEADCONDSCALEVAL | = lt_headcondscaleval | |
| HEADCONDSCALEQUAN | = lt_headcondscalequan | |
| PARTNER | = lt_partner | |
| EXTENSIONOUT | = lt_extensionout | |
| ACCOUNT | = lt_account | |
| RECEIVERS | = lt_receivers | |
| COMMUNICATION_DOCUMENTS | = lt_communication_documents | |
| APPLICATION_OBJECTS | = lt_application_objects | |
| SCHEDULE | = lt_schedule | |
| DELIVERYADDRESS | = lt_deliveryaddress | |
| SCCOMPONENT | = lt_sccomponent | |
| ITEMCONDVALIDITY | = lt_itemcondvalidity | |
| ITEMCONDSCALEVALUE | = lt_itemcondscalevalue | |
| ITEMCONDSCALEQUAN | = lt_itemcondscalequan | |
| ITEMCONDITION | = lt_itemcondition | |
| EXCEPTIONS | ||
| ERROR_CREATING_IDOCS = 1 | ||
| . " ALE_SAG_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM ALE_SAG_GETDETAIL
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 NUMBER FROM BAPIMEOUTHEADER INTO @DATA(ld_purchasingdocument). | ||||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_partnerdata). | ||||
| DATA(ld_partnerdata) | = ' '. | |||
| "SELECT single OBJ_TYPE FROM SERIAL INTO @DATA(ld_obj_type). | ||||
| DATA(ld_obj_type) | = 'BUS2013'. | |||
| "SELECT single CHNUM FROM SERIAL INTO @DATA(ld_serial_id). | ||||
| DATA(ld_serial_id) | = '0'. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_itemdata). | ||||
| DATA(ld_itemdata) | = 'X'. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_accountdata). | ||||
| DATA(ld_accountdata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_scheduledata). | ||||
| DATA(ld_scheduledata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_shippingdata). | ||||
| DATA(ld_shippingdata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_sccomponentdata). | ||||
| DATA(ld_sccomponentdata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_exportdata). | ||||
| DATA(ld_exportdata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_conditiondata). | ||||
| DATA(ld_conditiondata) | = ' '. | |||
| "SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_textdata). | ||||
| DATA(ld_textdata) | = ' '. | |||
Search for further information about these or an SAP related objects