SAP SHELF_SPACE_OPT_PROGRAM_EXE Function Module for NOTRANSL: Regaloptimierung: Aufruf eines externen Programms
SHELF_SPACE_OPT_PROGRAM_EXE is a standard shelf space opt program exe SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Regaloptimierung: Aufruf eines externen Programms 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 shelf space opt program exe FM, simply by entering the name SHELF_SPACE_OPT_PROGRAM_EXE into the relevant SAP transaction such as SE37 or SE38.
Function Group: WPLG
Program Name: SAPLWPLG
Main Program: SAPLWPLG
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SHELF_SPACE_OPT_PROGRAM_EXE 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 'SHELF_SPACE_OPT_PROGRAM_EXE'"NOTRANSL: Regaloptimierung: Aufruf eines externen Programms.
EXPORTING
HEAD_DATA = "Planogram Header Data
* LIST_CHECK = ' ' "Listing Check
* LAYOUT_CHECK = ' ' "Check layout
* ALL_STORES = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* NO_STORE = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* P_CLASS = ' ' "Class
* TYPE = ' ' "Class Type
* VERSION_CHECK = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
TABLES
ITEMS = "Planogram export item data
EXCEPTIONS
ERROR = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLWPLG_001 Modification of Eport Data for External Space Management
EXIT_SAPLWPLG_002 Modification of the Import Data for External Space Management
IMPORTING Parameters details for SHELF_SPACE_OPT_PROGRAM_EXE
HEAD_DATA - Planogram Header Data
Data type: BAPISHELFHDOptional: No
Call by Reference: No ( called with pass by value option)
LIST_CHECK - Listing Check
Data type: BAPISHELFHDIMP-LIST_CHECKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LAYOUT_CHECK - Check layout
Data type: WDL_FLAG-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ALL_STORES - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_FLAG-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_STORE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_FLAG-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_CLASS - Class
Data type: CUVT-CLASS_CUVTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TYPE - Class Type
Data type: CUVT-KLART_CUVTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VERSION_CHECK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: WDL_FLAG-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SHELF_SPACE_OPT_PROGRAM_EXE
ITEMS - Planogram export item data
Data type: BAPISHELFMATOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SHELF_SPACE_OPT_PROGRAM_EXE 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_error | TYPE STRING, " | |||
| lt_items | TYPE STANDARD TABLE OF BAPISHELFMAT, " | |||
| lv_head_data | TYPE BAPISHELFHD, " | |||
| lv_list_check | TYPE BAPISHELFHDIMP-LIST_CHECK, " SPACE | |||
| lv_layout_check | TYPE WDL_FLAG-XFELD, " SPACE | |||
| lv_all_stores | TYPE WDL_FLAG-XFELD, " SPACE | |||
| lv_no_store | TYPE WDL_FLAG-XFELD, " SPACE | |||
| lv_p_class | TYPE CUVT-CLASS_CUVT, " SPACE | |||
| lv_type | TYPE CUVT-KLART_CUVT, " SPACE | |||
| lv_version_check | TYPE WDL_FLAG-XFELD. " SPACE |
|   CALL FUNCTION 'SHELF_SPACE_OPT_PROGRAM_EXE' "NOTRANSL: Regaloptimierung: Aufruf eines externen Programms |
| EXPORTING | ||
| HEAD_DATA | = lv_head_data | |
| LIST_CHECK | = lv_list_check | |
| LAYOUT_CHECK | = lv_layout_check | |
| ALL_STORES | = lv_all_stores | |
| NO_STORE | = lv_no_store | |
| P_CLASS | = lv_p_class | |
| TYPE | = lv_type | |
| VERSION_CHECK | = lv_version_check | |
| TABLES | ||
| ITEMS | = lt_items | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " SHELF_SPACE_OPT_PROGRAM_EXE | ||
ABAP code using 7.40 inline data declarations to call FM SHELF_SPACE_OPT_PROGRAM_EXE
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 LIST_CHECK FROM BAPISHELFHDIMP INTO @DATA(ld_list_check). | ||||
| DATA(ld_list_check) | = ' '. | |||
| "SELECT single XFELD FROM WDL_FLAG INTO @DATA(ld_layout_check). | ||||
| DATA(ld_layout_check) | = ' '. | |||
| "SELECT single XFELD FROM WDL_FLAG INTO @DATA(ld_all_stores). | ||||
| DATA(ld_all_stores) | = ' '. | |||
| "SELECT single XFELD FROM WDL_FLAG INTO @DATA(ld_no_store). | ||||
| DATA(ld_no_store) | = ' '. | |||
| "SELECT single CLASS_CUVT FROM CUVT INTO @DATA(ld_p_class). | ||||
| DATA(ld_p_class) | = ' '. | |||
| "SELECT single KLART_CUVT FROM CUVT INTO @DATA(ld_type). | ||||
| DATA(ld_type) | = ' '. | |||
| "SELECT single XFELD FROM WDL_FLAG INTO @DATA(ld_version_check). | ||||
| DATA(ld_version_check) | = ' '. | |||
Search for further information about these or an SAP related objects