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

Function APO_BAPI_MAP_LOCATIONS2 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_LOCATIONS2'"Read Mapping Information of Locations.
EXPORTING
* IS_READ_OPTIONS = "Optionen für das Lesen von Lokations-Mappinginformationen
* IT_LOCATION_ID = "GUID (Länge 32) für Lokation
* IT_LOCATION_INT_ID = "GUID (Länge 22) für Lokation
* IT_LOCATION_KEY = "Externer Schlüssel für Lokation
* IT_LOCATION_INT_KEY = "Interner Schlüssel für Lokation
IMPORTING
ET_LOCATION_MAP = "Mappinginformation für Lokationen
ET_LOCATION_MAP_SRT = "Mappinginformation für Lokationen
ET_LOCATION_INT_MAP = "Interne Mappinginformation für Lokationen
ET_LOCATION_INT_ID = "GUID (Länge 22) für Lokation
ET_RETURN = "Returntabelle
IMPORTING Parameters details for APO_BAPI_MAP_LOCATIONS2
IS_READ_OPTIONS - Optionen für das Lesen von Lokations-Mappinginformationen
Data type: BAPI10002MAPREADOPTIONSOptional: Yes
Call by Reference: Yes
IT_LOCATION_ID - GUID (Länge 32) für Lokation
Data type: BAPI10002MAP_LOCIDTABOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_LOCATION_INT_ID - GUID (Länge 22) für Lokation
Data type: BAPI10002MAP_LOCINTIDTABOptional: Yes
Call by Reference: Yes
IT_LOCATION_KEY - Externer Schlüssel für Lokation
Data type: BAPI10002MAP_LOCKEYTABOptional: Yes
Call by Reference: Yes
IT_LOCATION_INT_KEY - Interner Schlüssel für Lokation
Data type: BAPI10002MAP_LOCINTKEYTABOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for APO_BAPI_MAP_LOCATIONS2
ET_LOCATION_MAP - Mappinginformation für Lokationen
Data type: BAPI10002MAP_LOCMAPTABOptional: No
Call by Reference: No ( called with pass by value option)
ET_LOCATION_MAP_SRT - Mappinginformation für Lokationen
Data type: BAPI10002MAP_LOCMAPTABSRTOptional: No
Call by Reference: No ( called with pass by value option)
ET_LOCATION_INT_MAP - Interne Mappinginformation für Lokationen
Data type: BAPI10002MAP_LOCINTMAPTABOptional: No
Call by Reference: No ( called with pass by value option)
ET_LOCATION_INT_ID - GUID (Länge 22) für Lokation
Data type: BAPI10002MAP_LOCINTIDTABOptional: No
Call by Reference: No ( called with pass by value option)
ET_RETURN - Returntabelle
Data type: BAPIRET2_TOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for APO_BAPI_MAP_LOCATIONS2 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_et_location_map | TYPE BAPI10002MAP_LOCMAPTAB, " | |||
| lv_is_read_options | TYPE BAPI10002MAPREADOPTIONS, " | |||
| lv_it_location_id | TYPE BAPI10002MAP_LOCIDTAB, " | |||
| lv_et_location_map_srt | TYPE BAPI10002MAP_LOCMAPTABSRT, " | |||
| lv_it_location_int_id | TYPE BAPI10002MAP_LOCINTIDTAB, " | |||
| lv_et_location_int_map | TYPE BAPI10002MAP_LOCINTMAPTAB, " | |||
| lv_it_location_key | TYPE BAPI10002MAP_LOCKEYTAB, " | |||
| lv_et_location_int_id | TYPE BAPI10002MAP_LOCINTIDTAB, " | |||
| lv_et_return | TYPE BAPIRET2_T, " | |||
| lv_it_location_int_key | TYPE BAPI10002MAP_LOCINTKEYTAB. " |
|   CALL FUNCTION 'APO_BAPI_MAP_LOCATIONS2' "Read Mapping Information of Locations |
| EXPORTING | ||
| IS_READ_OPTIONS | = lv_is_read_options | |
| IT_LOCATION_ID | = lv_it_location_id | |
| IT_LOCATION_INT_ID | = lv_it_location_int_id | |
| IT_LOCATION_KEY | = lv_it_location_key | |
| IT_LOCATION_INT_KEY | = lv_it_location_int_key | |
| IMPORTING | ||
| ET_LOCATION_MAP | = lv_et_location_map | |
| ET_LOCATION_MAP_SRT | = lv_et_location_map_srt | |
| ET_LOCATION_INT_MAP | = lv_et_location_int_map | |
| ET_LOCATION_INT_ID | = lv_et_location_int_id | |
| ET_RETURN | = lv_et_return | |
| . " APO_BAPI_MAP_LOCATIONS2 | ||
ABAP code using 7.40 inline data declarations to call FM APO_BAPI_MAP_LOCATIONS2
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.Search for further information about these or an SAP related objects