SAP /SAPAPO/DM_LOCS_GET Function Module for Read MATKEY and MATLOC Entries with Ranges Tables
/SAPAPO/DM_LOCS_GET is a standard /sapapo/dm locs get 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 MATKEY and MATLOC Entries with Ranges Tables 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 /sapapo/dm locs get FM, simply by entering the name /SAPAPO/DM_LOCS_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/LOC_EXTERN
Program Name: /SAPAPO/SAPLLOC_EXTERN
Main Program: /SAPAPO/SAPLLOC_EXTERN
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_LOCS_GET 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 '/SAPAPO/DM_LOCS_GET'"Read MATKEY and MATLOC Entries with Ranges Tables.
EXPORTING
* I_INIT_FLG = 'X' "Einstelliges Kennzeichen
* I_SORT_FLG = 'X' "Einstelliges Kennzeichen
* I_DEL_DUPL_FLG = 'X' "Einstelliges Kennzeichen
TABLES
* I_LOCNO_RTAB = "
* I_LTYPE_RTAB = "
* I_MODEL_RTAB = "Lokation: Ranges-Struktur für Modell
* I_OBJ_BASE_RTAB = "Rangestruktur für Basisobjekte vom Typ Material
* E_LOCS_TAB = "Table of Locations
* ET_LOC_BLOCK_STATUS = "table for /SCMB/LOC_S_BLOCKED_KEYS
IMPORTING Parameters details for /SAPAPO/DM_LOCS_GET
I_INIT_FLG - Einstelliges Kennzeichen
Data type: XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SORT_FLG - Einstelliges Kennzeichen
Data type: XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DEL_DUPL_FLG - Einstelliges Kennzeichen
Data type: XFLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for /SAPAPO/DM_LOCS_GET
I_LOCNO_RTAB -
Data type: /SAPAPO/LOCNO_RSTROptional: Yes
Call by Reference: No ( called with pass by value option)
I_LTYPE_RTAB -
Data type: /SAPAPO/LTYPE_RSTROptional: Yes
Call by Reference: Yes
I_MODEL_RTAB - Lokation: Ranges-Struktur für Modell
Data type: /SAPAPO/LOC_MODEL_RSTROptional: Yes
Call by Reference: Yes
I_OBJ_BASE_RTAB - Rangestruktur für Basisobjekte vom Typ Material
Data type: /SAPAPO/LOC_OBJBASE_RSTROptional: Yes
Call by Reference: Yes
E_LOCS_TAB - Table of Locations
Data type: /SAPAPO/LOC_TABOptional: Yes
Call by Reference: Yes
ET_LOC_BLOCK_STATUS - table for /SCMB/LOC_S_BLOCKED_KEYS
Data type: /SCMB/LOC_TT_BLOCKED_KEYSOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/DM_LOCS_GET 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_i_init_flg | TYPE XFLAG, " 'X' | |||
| lt_i_locno_rtab | TYPE STANDARD TABLE OF /SAPAPO/LOCNO_RSTR, " | |||
| lv_i_sort_flg | TYPE XFLAG, " 'X' | |||
| lt_i_ltype_rtab | TYPE STANDARD TABLE OF /SAPAPO/LTYPE_RSTR, " | |||
| lt_i_model_rtab | TYPE STANDARD TABLE OF /SAPAPO/LOC_MODEL_RSTR, " | |||
| lv_i_del_dupl_flg | TYPE XFLAG, " 'X' | |||
| lt_i_obj_base_rtab | TYPE STANDARD TABLE OF /SAPAPO/LOC_OBJBASE_RSTR, " | |||
| lt_e_locs_tab | TYPE STANDARD TABLE OF /SAPAPO/LOC_TAB, " | |||
| lt_et_loc_block_status | TYPE STANDARD TABLE OF /SCMB/LOC_TT_BLOCKED_KEYS. " |
|   CALL FUNCTION '/SAPAPO/DM_LOCS_GET' "Read MATKEY and MATLOC Entries with Ranges Tables |
| EXPORTING | ||
| I_INIT_FLG | = lv_i_init_flg | |
| I_SORT_FLG | = lv_i_sort_flg | |
| I_DEL_DUPL_FLG | = lv_i_del_dupl_flg | |
| TABLES | ||
| I_LOCNO_RTAB | = lt_i_locno_rtab | |
| I_LTYPE_RTAB | = lt_i_ltype_rtab | |
| I_MODEL_RTAB | = lt_i_model_rtab | |
| I_OBJ_BASE_RTAB | = lt_i_obj_base_rtab | |
| E_LOCS_TAB | = lt_e_locs_tab | |
| ET_LOC_BLOCK_STATUS | = lt_et_loc_block_status | |
| . " /SAPAPO/DM_LOCS_GET | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_LOCS_GET
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_i_init_flg) | = 'X'. | |||
| DATA(ld_i_sort_flg) | = 'X'. | |||
| DATA(ld_i_del_dupl_flg) | = 'X'. | |||
Search for further information about these or an SAP related objects