SAP BAPI_ADV_MED_GET_LAYOUT Function Module for Read Product Catalog Layout
BAPI_ADV_MED_GET_LAYOUT is a standard bapi adv med get layout 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 Product Catalog Layout 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 adv med get layout FM, simply by entering the name BAPI_ADV_MED_GET_LAYOUT into the relevant SAP transaction such as SE37 or SE38.
Function Group: 1071
Program Name: SAPL1071
Main Program: SAPL1071
Appliation area: W
Release date: 17-Sep-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_ADV_MED_GET_LAYOUT 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_ADV_MED_GET_LAYOUT'"Read Product Catalog Layout.
EXPORTING
CATALOG = "Product Catalog
VARIANT = "Variant
* WITH_ITEMS = ' ' "Flag for Reading Items
* WITH_PRICES = ' ' "Flag for Reading Prices
* APPLY_CHAR_FILTER = ' ' "Use Characteristic Filter
* APPLY_AUTH_FILTER = ' ' "Use Authorization Filter
* AREA = ' ' "Layout Area Number
* READ_STEPWISE = ' ' "Checkbox field
* WITH_KZKFG = ' ' "Indicator for Reading Material Configuration Indicator
IMPORTING
LAYOUT = "Layout
RETURN = "Return Value
TABLES
LANGUAGES = "Languages of Variant
CURRENCIES = "Currencies of Variant
AREAS = "Layout Areas
* ITEMS = "Layout Area Items
TEXTS = "Texts for Layout Areas and Items
* PRICES = "Prices
* FILTER_CRITERIA = "
* RETURN_AREAS = "Return Values for Layout Areas
IMPORTING Parameters details for BAPI_ADV_MED_GET_LAYOUT
CATALOG - Product Catalog
Data type: BAPIADMID-PRODCATOptional: No
Call by Reference: No ( called with pass by value option)
VARIANT - Variant
Data type: BAPIADMVID-VARIANTOptional: No
Call by Reference: No ( called with pass by value option)
WITH_ITEMS - Flag for Reading Items
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PRICES - Flag for Reading Prices
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
APPLY_CHAR_FILTER - Use Characteristic Filter
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
APPLY_AUTH_FILTER - Use Authorization Filter
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
AREA - Layout Area Number
Data type: BAPILAYA-AREADefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_STEPWISE - Checkbox field
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_KZKFG - Indicator for Reading Material Configuration Indicator
Data type: BAPILAYHLP-XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_ADV_MED_GET_LAYOUT
LAYOUT - Layout
Data type: BAPILAYA-LAYOUTOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Value
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_ADV_MED_GET_LAYOUT
LANGUAGES - Languages of Variant
Data type: BAPIADMVLOptional: No
Call by Reference: No ( called with pass by value option)
CURRENCIES - Currencies of Variant
Data type: BAPIADMVCOptional: No
Call by Reference: No ( called with pass by value option)
AREAS - Layout Areas
Data type: BAPILAYAOptional: No
Call by Reference: No ( called with pass by value option)
ITEMS - Layout Area Items
Data type: BAPILAYITOptional: Yes
Call by Reference: No ( called with pass by value option)
TEXTS - Texts for Layout Areas and Items
Data type: BAPILAYTXOptional: No
Call by Reference: No ( called with pass by value option)
PRICES - Prices
Data type: BAPIADMIPOptional: Yes
Call by Reference: No ( called with pass by value option)
FILTER_CRITERIA -
Data type: API_VAL_ROptional: Yes
Call by Reference: No ( called with pass by value option)
RETURN_AREAS - Return Values for Layout Areas
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_ADV_MED_GET_LAYOUT 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_layout | TYPE BAPILAYA-LAYOUT, " | |||
| lv_catalog | TYPE BAPIADMID-PRODCAT, " | |||
| lt_languages | TYPE STANDARD TABLE OF BAPIADMVL, " | |||
| lv_return | TYPE BAPIRETURN, " | |||
| lv_variant | TYPE BAPIADMVID-VARIANT, " | |||
| lt_currencies | TYPE STANDARD TABLE OF BAPIADMVC, " | |||
| lt_areas | TYPE STANDARD TABLE OF BAPILAYA, " | |||
| lv_with_items | TYPE BAPILAYHLP-XFELD, " SPACE | |||
| lt_items | TYPE STANDARD TABLE OF BAPILAYIT, " | |||
| lv_with_prices | TYPE BAPILAYHLP-XFELD, " SPACE | |||
| lt_texts | TYPE STANDARD TABLE OF BAPILAYTX, " | |||
| lv_apply_char_filter | TYPE BAPILAYHLP-XFELD, " SPACE | |||
| lt_prices | TYPE STANDARD TABLE OF BAPIADMIP, " | |||
| lv_apply_auth_filter | TYPE BAPILAYHLP-XFELD, " SPACE | |||
| lv_area | TYPE BAPILAYA-AREA, " SPACE | |||
| lt_filter_criteria | TYPE STANDARD TABLE OF API_VAL_R, " | |||
| lt_return_areas | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_read_stepwise | TYPE BAPILAYHLP-XFELD, " SPACE | |||
| lv_with_kzkfg | TYPE BAPILAYHLP-XFELD. " SPACE |
|   CALL FUNCTION 'BAPI_ADV_MED_GET_LAYOUT' "Read Product Catalog Layout |
| EXPORTING | ||
| CATALOG | = lv_catalog | |
| VARIANT | = lv_variant | |
| WITH_ITEMS | = lv_with_items | |
| WITH_PRICES | = lv_with_prices | |
| APPLY_CHAR_FILTER | = lv_apply_char_filter | |
| APPLY_AUTH_FILTER | = lv_apply_auth_filter | |
| AREA | = lv_area | |
| READ_STEPWISE | = lv_read_stepwise | |
| WITH_KZKFG | = lv_with_kzkfg | |
| IMPORTING | ||
| LAYOUT | = lv_layout | |
| RETURN | = lv_return | |
| TABLES | ||
| LANGUAGES | = lt_languages | |
| CURRENCIES | = lt_currencies | |
| AREAS | = lt_areas | |
| ITEMS | = lt_items | |
| TEXTS | = lt_texts | |
| PRICES | = lt_prices | |
| FILTER_CRITERIA | = lt_filter_criteria | |
| RETURN_AREAS | = lt_return_areas | |
| . " BAPI_ADV_MED_GET_LAYOUT | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_ADV_MED_GET_LAYOUT
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 FROM BAPILAYA INTO @DATA(ld_layout). | ||||
| "SELECT single PRODCAT FROM BAPIADMID INTO @DATA(ld_catalog). | ||||
| "SELECT single VARIANT FROM BAPIADMVID INTO @DATA(ld_variant). | ||||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_with_items). | ||||
| DATA(ld_with_items) | = ' '. | |||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_with_prices). | ||||
| DATA(ld_with_prices) | = ' '. | |||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_apply_char_filter). | ||||
| DATA(ld_apply_char_filter) | = ' '. | |||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_apply_auth_filter). | ||||
| DATA(ld_apply_auth_filter) | = ' '. | |||
| "SELECT single AREA FROM BAPILAYA INTO @DATA(ld_area). | ||||
| DATA(ld_area) | = ' '. | |||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_read_stepwise). | ||||
| DATA(ld_read_stepwise) | = ' '. | |||
| "SELECT single XFELD FROM BAPILAYHLP INTO @DATA(ld_with_kzkfg). | ||||
| DATA(ld_with_kzkfg) | = ' '. | |||
Search for further information about these or an SAP related objects