SAP BAPI_SITELAYMOD_GETITEMS2 Function Module for Layout Module: Read Material Data
BAPI_SITELAYMOD_GETITEMS2 is a standard bapi sitelaymod getitems2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Layout Module: Read Material Data 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 bapi sitelaymod getitems2 FM, simply by entering the name BAPI_SITELAYMOD_GETITEMS2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: WPLG
Program Name: SAPLWPLG
Main Program: SAPLWPLG
Appliation area: W
Release date: 14-Apr-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_SITELAYMOD_GETITEMS2 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 'BAPI_SITELAYMOD_GETITEMS2'"Layout Module: Read Material Data.
EXPORTING
LAYOUTMODULE = "Layout Module
PRICEDATE = "Key Date for Pricing/Listing Check
CONTROLS = "Control Data
IMPORTING
RETURN = "Confirmations
HEAD_DATA = "Planogram Header Data
TABLES
ITEMS = "Planogram Export Item Data
STORES = "Table for Selecting Stores
STORE_CLASSES = "Table for Selecting Store Groups
* EXTENSIONOUT = "Filler Structure for Additional Values
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 BAPI_SITELAYMOD_GETITEMS2
LAYOUTMODULE - Layout Module
Data type: BAPISHELFHD-LAYOUT_MODOptional: No
Call by Reference: No ( called with pass by value option)
PRICEDATE - Key Date for Pricing/Listing Check
Data type: BAPISHELFHD-PRICE_DATEOptional: No
Call by Reference: No ( called with pass by value option)
CONTROLS - Control Data
Data type: BAPISHELFHDEXPOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_SITELAYMOD_GETITEMS2
RETURN - Confirmations
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
HEAD_DATA - Planogram Header Data
Data type: BAPISHELFHDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_SITELAYMOD_GETITEMS2
ITEMS - Planogram Export Item Data
Data type: BAPISHELFMATOptional: No
Call by Reference: No ( called with pass by value option)
STORES - Table for Selecting Stores
Data type: BAPI_SHELFSTORESOptional: No
Call by Reference: No ( called with pass by value option)
STORE_CLASSES - Table for Selecting Store Groups
Data type: BAPI_SHELFSTORESCLASSESOptional: No
Call by Reference: No ( called with pass by value option)
EXTENSIONOUT - Filler Structure for Additional Values
Data type: BAPIPAREXOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_SITELAYMOD_GETITEMS2 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_items | TYPE STANDARD TABLE OF BAPISHELFMAT, " | |||
| lv_return | TYPE BAPIRETURN1, " | |||
| lv_layoutmodule | TYPE BAPISHELFHD-LAYOUT_MOD, " | |||
| lt_stores | TYPE STANDARD TABLE OF BAPI_SHELFSTORES, " | |||
| lv_head_data | TYPE BAPISHELFHD, " | |||
| lv_pricedate | TYPE BAPISHELFHD-PRICE_DATE, " | |||
| lv_controls | TYPE BAPISHELFHDEXP, " | |||
| lt_store_classes | TYPE STANDARD TABLE OF BAPI_SHELFSTORESCLASSES, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX. " |
|   CALL FUNCTION 'BAPI_SITELAYMOD_GETITEMS2' "Layout Module: Read Material Data |
| EXPORTING | ||
| LAYOUTMODULE | = lv_layoutmodule | |
| PRICEDATE | = lv_pricedate | |
| CONTROLS | = lv_controls | |
| IMPORTING | ||
| RETURN | = lv_return | |
| HEAD_DATA | = lv_head_data | |
| TABLES | ||
| ITEMS | = lt_items | |
| STORES | = lt_stores | |
| STORE_CLASSES | = lt_store_classes | |
| EXTENSIONOUT | = lt_extensionout | |
| . " BAPI_SITELAYMOD_GETITEMS2 | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_SITELAYMOD_GETITEMS2
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 LAYOUT_MOD FROM BAPISHELFHD INTO @DATA(ld_layoutmodule). | ||||
| "SELECT single PRICE_DATE FROM BAPISHELFHD INTO @DATA(ld_pricedate). | ||||
Search for further information about these or an SAP related objects