SAP Function Modules

BAPI_ADV_MED_GET_LAYOUT SAP Function module - Read Product Catalog Layout







BAPI_ADV_MED_GET_LAYOUT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_ADV_MED_GET_LAYOUT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: 1071
Released Date: 17.09.1997
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_ADV_MED_GET_LAYOUT - BAPI ADV MED GET LAYOUT





CALL FUNCTION 'BAPI_ADV_MED_GET_LAYOUT' "Read Product Catalog Layout
  EXPORTING
    catalog =                   " bapiadmid-prodcat  Product Catalog
    variant =                   " bapiadmvid-variant  Variant
*   with_items = SPACE          " bapilayhlp-xfeld  Flag for Reading Items
*   with_prices = SPACE         " bapilayhlp-xfeld  Flag for Reading Prices
*   apply_char_filter = SPACE   " bapilayhlp-xfeld  Use Characteristic Filter
*   apply_auth_filter = SPACE   " bapilayhlp-xfeld  Use Authorization Filter
*   area = SPACE                " bapilaya-area  Layout Area Number
*   read_stepwise = SPACE       " bapilayhlp-xfeld  Checkbox field
*   with_kzkfg = SPACE          " bapilayhlp-xfeld  Indicator for Reading Material Configuration Indicator
  IMPORTING
    layout =                    " bapilaya-layout  Layout
    return =                    " bapireturn    Return Value
  TABLES
    languages =                 " bapiadmvl     Languages of Variant
    currencies =                " bapiadmvc     Currencies of Variant
    areas =                     " bapilaya      Layout Areas
*   items =                     " bapilayit     Layout Area Items
    texts =                     " bapilaytx     Texts for Layout Areas and Items
*   prices =                    " bapiadmip     Prices
*   filter_criteria =           " api_val_r
*   return_areas =              " bapiret2      Return Values for Layout Areas
    .  "  BAPI_ADV_MED_GET_LAYOUT

ABAP code example for Function Module BAPI_ADV_MED_GET_LAYOUT





The ABAP code below is a full code listing to execute function module BAPI_ADV_MED_GET_LAYOUT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_layout  TYPE BAPILAYA-LAYOUT ,
ld_return  TYPE BAPIRETURN ,
it_languages  TYPE STANDARD TABLE OF BAPIADMVL,"TABLES PARAM
wa_languages  LIKE LINE OF it_languages ,
it_currencies  TYPE STANDARD TABLE OF BAPIADMVC,"TABLES PARAM
wa_currencies  LIKE LINE OF it_currencies ,
it_areas  TYPE STANDARD TABLE OF BAPILAYA,"TABLES PARAM
wa_areas  LIKE LINE OF it_areas ,
it_items  TYPE STANDARD TABLE OF BAPILAYIT,"TABLES PARAM
wa_items  LIKE LINE OF it_items ,
it_texts  TYPE STANDARD TABLE OF BAPILAYTX,"TABLES PARAM
wa_texts  LIKE LINE OF it_texts ,
it_prices  TYPE STANDARD TABLE OF BAPIADMIP,"TABLES PARAM
wa_prices  LIKE LINE OF it_prices ,
it_filter_criteria  TYPE STANDARD TABLE OF API_VAL_R,"TABLES PARAM
wa_filter_criteria  LIKE LINE OF it_filter_criteria ,
it_return_areas  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return_areas  LIKE LINE OF it_return_areas .


DATA(ld_catalog) = some text here

DATA(ld_variant) = some text here

DATA(ld_with_items) = some text here

DATA(ld_with_prices) = some text here

DATA(ld_apply_char_filter) = some text here

DATA(ld_apply_auth_filter) = some text here

DATA(ld_area) = Check type of data required

DATA(ld_read_stepwise) = some text here

DATA(ld_with_kzkfg) = some text here

"populate fields of struture and append to itab
append wa_languages to it_languages.

"populate fields of struture and append to itab
append wa_currencies to it_currencies.

"populate fields of struture and append to itab
append wa_areas to it_areas.

"populate fields of struture and append to itab
append wa_items to it_items.

"populate fields of struture and append to itab
append wa_texts to it_texts.

"populate fields of struture and append to itab
append wa_prices to it_prices.

"populate fields of struture and append to itab
append wa_filter_criteria to it_filter_criteria.

"populate fields of struture and append to itab
append wa_return_areas to it_return_areas. . CALL FUNCTION 'BAPI_ADV_MED_GET_LAYOUT' EXPORTING catalog = ld_catalog variant = ld_variant * with_items = ld_with_items * with_prices = ld_with_prices * apply_char_filter = ld_apply_char_filter * apply_auth_filter = ld_apply_auth_filter * area = ld_area * read_stepwise = ld_read_stepwise * with_kzkfg = ld_with_kzkfg IMPORTING layout = ld_layout return = ld_return TABLES languages = it_languages currencies = it_currencies areas = it_areas * items = it_items texts = it_texts * prices = it_prices * filter_criteria = it_filter_criteria * return_areas = it_return_areas . " BAPI_ADV_MED_GET_LAYOUT
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_layout  TYPE BAPILAYA-LAYOUT ,
ld_catalog  TYPE BAPIADMID-PRODCAT ,
it_languages  TYPE STANDARD TABLE OF BAPIADMVL ,
wa_languages  LIKE LINE OF it_languages,
ld_return  TYPE BAPIRETURN ,
ld_variant  TYPE BAPIADMVID-VARIANT ,
it_currencies  TYPE STANDARD TABLE OF BAPIADMVC ,
wa_currencies  LIKE LINE OF it_currencies,
ld_with_items  TYPE BAPILAYHLP-XFELD ,
it_areas  TYPE STANDARD TABLE OF BAPILAYA ,
wa_areas  LIKE LINE OF it_areas,
ld_with_prices  TYPE BAPILAYHLP-XFELD ,
it_items  TYPE STANDARD TABLE OF BAPILAYIT ,
wa_items  LIKE LINE OF it_items,
ld_apply_char_filter  TYPE BAPILAYHLP-XFELD ,
it_texts  TYPE STANDARD TABLE OF BAPILAYTX ,
wa_texts  LIKE LINE OF it_texts,
ld_apply_auth_filter  TYPE BAPILAYHLP-XFELD ,
it_prices  TYPE STANDARD TABLE OF BAPIADMIP ,
wa_prices  LIKE LINE OF it_prices,
ld_area  TYPE BAPILAYA-AREA ,
it_filter_criteria  TYPE STANDARD TABLE OF API_VAL_R ,
wa_filter_criteria  LIKE LINE OF it_filter_criteria,
ld_read_stepwise  TYPE BAPILAYHLP-XFELD ,
it_return_areas  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return_areas  LIKE LINE OF it_return_areas,
ld_with_kzkfg  TYPE BAPILAYHLP-XFELD .


ld_catalog = some text here

"populate fields of struture and append to itab
append wa_languages to it_languages.

ld_variant = some text here

"populate fields of struture and append to itab
append wa_currencies to it_currencies.

ld_with_items = some text here

"populate fields of struture and append to itab
append wa_areas to it_areas.

ld_with_prices = some text here

"populate fields of struture and append to itab
append wa_items to it_items.

ld_apply_char_filter = some text here

"populate fields of struture and append to itab
append wa_texts to it_texts.

ld_apply_auth_filter = some text here

"populate fields of struture and append to itab
append wa_prices to it_prices.

ld_area = Check type of data required

"populate fields of struture and append to itab
append wa_filter_criteria to it_filter_criteria.

ld_read_stepwise = some text here

"populate fields of struture and append to itab
append wa_return_areas to it_return_areas.

ld_with_kzkfg = some text here

SAP Documentation for FM BAPI_ADV_MED_GET_LAYOUT


This method can be used to read information for the layout of a product catalog. ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_ADV_MED_GET_LAYOUT or its description.