SAP APO_BAPI_MAP_ORDERS Function Module for Mapping of Orders
APO_BAPI_MAP_ORDERS is a standard apo bapi map orders SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Mapping of Orders 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 apo bapi map orders FM, simply by entering the name APO_BAPI_MAP_ORDERS into the relevant SAP transaction such as SE37 or SE38.
Function Group: APO_BAPI_GEN_PPDS
Program Name: SAPLAPO_BAPI_GEN_PPDS
Main Program: SAPLAPO_BAPI_GEN_PPDS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function APO_BAPI_MAP_ORDERS 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 'APO_BAPI_MAP_ORDERS'"Mapping of Orders.
EXPORTING
* IV_LOGSYS = "System (logisches System) aus dem die Nachricht stammt
* IV_SIMSESSION = GC_OM_SIMSESSION_DEF "GUID zur Identifikation transaktionale Simulations-Session
* IV_ADD_STOCK_TO_ORDKEY = "auch Bestände in ORDKEY zurückgeben
* IV_ADD_TO_BUFFER = "Einträge aus ORDMAP/ORDKEY in DM-Puffer füllen
* IV_NO_LC_COMMIT = ' ' "
* IV_LOGQSTMP = "Betriebswirtschaftlicher Systemverbund
* IV_SIMVERSION = '000' "Planversion (operativ oder eine Simulationsversion)
* IT_ORDID = "Tabelle mit internen Nummern von Auftraegen
* IT_ORDMAPKEY = "Schlüssel für Ordmap-selects
* IT_ORDKEY_ORDID = "Tabelle zur Schlüsseldefinition auf der ordkey
* IT_ORDKEY_ORDNO = "Tabelle von externen Auftragsnummern
* IV_ADD_ORDKEY_TO_ORDMAP = 'X' "Einträge, die nur in ORDKEY sind, werden in ET_ORDMAP mit R3OBJ= 8 angefügt
* IV_ADD_STOCK_TO_ORDMAP = "Auch Bestands-GUIDs in ORDMAP aufnehmen
IMPORTING
ET_ORDMAP = "Mappingtabelle für Aufträge
ET_ORDKEY = "Tabelle von Ordkeys
ET_ORDERS = "Tabelle mit erweiterten Daten zu Auftraegen im liveCache
CHANGING
* CT_ORDMAP = "Tabelle von Einträgen aus der Mappingtabelle für Aufträge
* CT_ORDKEY = "Tabelle von Ordkeys
* CT_ORDERS = "Tabelle mit erweiterten Daten zu Auftraegen im liveCache
EXCEPTIONS
CONNECTION_FAILED = 1 COM_ERROR = 2 APPLICATION_ERROR = 3 UNKNOWN_ERROR = 4
IMPORTING Parameters details for APO_BAPI_MAP_ORDERS
IV_LOGSYS - System (logisches System) aus dem die Nachricht stammt
Data type: BAPILOGSYSOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SIMSESSION - GUID zur Identifikation transaktionale Simulations-Session
Data type: /SAPAPO/OM_SIMSESSIONDefault: GC_OM_SIMSESSION_DEF
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_ADD_STOCK_TO_ORDKEY - auch Bestände in ORDKEY zurückgeben
Data type: BAPIYESNOOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ADD_TO_BUFFER - Einträge aus ORDMAP/ORDKEY in DM-Puffer füllen
Data type: BAPIYESNOOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_NO_LC_COMMIT -
Data type: BAPIYESNODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_LOGQSTMP - Betriebswirtschaftlicher Systemverbund
Data type: /SAPAPO/LOGQSOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SIMVERSION - Planversion (operativ oder eine Simulationsversion)
Data type: /SAPAPO/VRSIOIDDefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_ORDID - Tabelle mit internen Nummern von Auftraegen
Data type: /SAPAPO/ORDID_TABOptional: Yes
Call by Reference: Yes
IT_ORDMAPKEY - Schlüssel für Ordmap-selects
Data type: /SAPAPO/DM_ORDMAPKEY_TABOptional: Yes
Call by Reference: Yes
IT_ORDKEY_ORDID - Tabelle zur Schlüsseldefinition auf der ordkey
Data type: /SAPAPO/DM_ORDKEY_SIMID_TABOptional: Yes
Call by Reference: Yes
IT_ORDKEY_ORDNO - Tabelle von externen Auftragsnummern
Data type: /SAPAPO/ORDNO_TABOptional: Yes
Call by Reference: Yes
IV_ADD_ORDKEY_TO_ORDMAP - Einträge, die nur in ORDKEY sind, werden in ET_ORDMAP mit R3OBJ= 8 angefügt
Data type: BAPIYESNODefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_ADD_STOCK_TO_ORDMAP - Auch Bestands-GUIDs in ORDMAP aufnehmen
Data type: BAPIYESNOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for APO_BAPI_MAP_ORDERS
ET_ORDMAP - Mappingtabelle für Aufträge
Data type: /SAPAPO/ORDMAP_TABOptional: No
Call by Reference: Yes
ET_ORDKEY - Tabelle von Ordkeys
Data type: /SAPAPO/ORDKEY_TABOptional: No
Call by Reference: Yes
ET_ORDERS - Tabelle mit erweiterten Daten zu Auftraegen im liveCache
Data type: /SAPAPO/OM_ORDER_EXT_TABOptional: No
Call by Reference: Yes
CHANGING Parameters details for APO_BAPI_MAP_ORDERS
CT_ORDMAP - Tabelle von Einträgen aus der Mappingtabelle für Aufträge
Data type: /SAPAPO/ORDMAP_TABOptional: Yes
Call by Reference: Yes
CT_ORDKEY - Tabelle von Ordkeys
Data type: /SAPAPO/ORDKEY_TABOptional: Yes
Call by Reference: Yes
CT_ORDERS - Tabelle mit erweiterten Daten zu Auftraegen im liveCache
Data type: /SAPAPO/OM_ORDER_EXT_TABOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
CONNECTION_FAILED - Verbindung zum Live Cache fehlgeschlagen
Data type:Optional: No
Call by Reference: Yes
COM_ERROR - Com Routinen Fehler
Data type:Optional: No
Call by Reference: Yes
APPLICATION_ERROR - Applikationsfehler
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR - Unbekannter Fehler aufgetreten
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for APO_BAPI_MAP_ORDERS 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_ct_ordmap | TYPE /SAPAPO/ORDMAP_TAB, " | |||
| lv_et_ordmap | TYPE /SAPAPO/ORDMAP_TAB, " | |||
| lv_iv_logsys | TYPE BAPILOGSYS, " | |||
| lv_connection_failed | TYPE BAPILOGSYS, " | |||
| lv_iv_simsession | TYPE /SAPAPO/OM_SIMSESSION, " GC_OM_SIMSESSION_DEF | |||
| lv_iv_add_stock_to_ordkey | TYPE BAPIYESNO, " | |||
| lv_iv_add_to_buffer | TYPE BAPIYESNO, " | |||
| lv_iv_no_lc_commit | TYPE BAPIYESNO, " SPACE | |||
| lv_com_error | TYPE BAPIYESNO, " | |||
| lv_ct_ordkey | TYPE /SAPAPO/ORDKEY_TAB, " | |||
| lv_et_ordkey | TYPE /SAPAPO/ORDKEY_TAB, " | |||
| lv_iv_logqstmp | TYPE /SAPAPO/LOGQS, " | |||
| lv_ct_orders | TYPE /SAPAPO/OM_ORDER_EXT_TAB, " | |||
| lv_et_orders | TYPE /SAPAPO/OM_ORDER_EXT_TAB, " | |||
| lv_iv_simversion | TYPE /SAPAPO/VRSIOID, " '000' | |||
| lv_application_error | TYPE /SAPAPO/VRSIOID, " | |||
| lv_it_ordid | TYPE /SAPAPO/ORDID_TAB, " | |||
| lv_unknown_error | TYPE /SAPAPO/ORDID_TAB, " | |||
| lv_it_ordmapkey | TYPE /SAPAPO/DM_ORDMAPKEY_TAB, " | |||
| lv_it_ordkey_ordid | TYPE /SAPAPO/DM_ORDKEY_SIMID_TAB, " | |||
| lv_it_ordkey_ordno | TYPE /SAPAPO/ORDNO_TAB, " | |||
| lv_iv_add_ordkey_to_ordmap | TYPE BAPIYESNO, " 'X' | |||
| lv_iv_add_stock_to_ordmap | TYPE BAPIYESNO. " |
|   CALL FUNCTION 'APO_BAPI_MAP_ORDERS' "Mapping of Orders |
| EXPORTING | ||
| IV_LOGSYS | = lv_iv_logsys | |
| IV_SIMSESSION | = lv_iv_simsession | |
| IV_ADD_STOCK_TO_ORDKEY | = lv_iv_add_stock_to_ordkey | |
| IV_ADD_TO_BUFFER | = lv_iv_add_to_buffer | |
| IV_NO_LC_COMMIT | = lv_iv_no_lc_commit | |
| IV_LOGQSTMP | = lv_iv_logqstmp | |
| IV_SIMVERSION | = lv_iv_simversion | |
| IT_ORDID | = lv_it_ordid | |
| IT_ORDMAPKEY | = lv_it_ordmapkey | |
| IT_ORDKEY_ORDID | = lv_it_ordkey_ordid | |
| IT_ORDKEY_ORDNO | = lv_it_ordkey_ordno | |
| IV_ADD_ORDKEY_TO_ORDMAP | = lv_iv_add_ordkey_to_ordmap | |
| IV_ADD_STOCK_TO_ORDMAP | = lv_iv_add_stock_to_ordmap | |
| IMPORTING | ||
| ET_ORDMAP | = lv_et_ordmap | |
| ET_ORDKEY | = lv_et_ordkey | |
| ET_ORDERS | = lv_et_orders | |
| CHANGING | ||
| CT_ORDMAP | = lv_ct_ordmap | |
| CT_ORDKEY | = lv_ct_ordkey | |
| CT_ORDERS | = lv_ct_orders | |
| EXCEPTIONS | ||
| CONNECTION_FAILED = 1 | ||
| COM_ERROR = 2 | ||
| APPLICATION_ERROR = 3 | ||
| UNKNOWN_ERROR = 4 | ||
| . " APO_BAPI_MAP_ORDERS | ||
ABAP code using 7.40 inline data declarations to call FM APO_BAPI_MAP_ORDERS
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.| DATA(ld_iv_simsession) | = GC_OM_SIMSESSION_DEF. | |||
| DATA(ld_iv_no_lc_commit) | = ' '. | |||
| DATA(ld_iv_simversion) | = '000'. | |||
| DATA(ld_iv_add_ordkey_to_ordmap) | = 'X'. | |||
Search for further information about these or an SAP related objects