SAP Function Modules

BAPI_ADV_MED_GET_ITEMS SAP Function module - Read Product Catalog Items







BAPI_ADV_MED_GET_ITEMS 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_ITEMS 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_ITEMS - BAPI ADV MED GET ITEMS





CALL FUNCTION 'BAPI_ADV_MED_GET_ITEMS' "Read Product Catalog Items
  EXPORTING
    catalog =                   " bapiadmid-prodcat  Product Catalog
    variant =                   " bapiadmvid-variant  Variant
*   area = SPACE                " bapilaya-area  Layout Area
*   with_prices = SPACE         " bapilayhlp-xfeld  Flag for Reading Prices
*   with_kzkfg = SPACE          " bapilayhlp-xfeld  Indicator for Reading Material Configuration Indicator
  IMPORTING
    return =                    " bapireturn    Return Value
  TABLES
    items =                     " bapilayit     Layout Area Items
    texts =                     " bapilaytx     Texts for Layout Area Items
*   prices =                    " bapiadmip     Prices
    .  "  BAPI_ADV_MED_GET_ITEMS

ABAP code example for Function Module BAPI_ADV_MED_GET_ITEMS





The ABAP code below is a full code listing to execute function module BAPI_ADV_MED_GET_ITEMS 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_return  TYPE BAPIRETURN ,
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 .


DATA(ld_catalog) = some text here

DATA(ld_variant) = some text here

DATA(ld_area) = Check type of data required

DATA(ld_with_prices) = some text here

DATA(ld_with_kzkfg) = some text here

"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. . CALL FUNCTION 'BAPI_ADV_MED_GET_ITEMS' EXPORTING catalog = ld_catalog variant = ld_variant * area = ld_area * with_prices = ld_with_prices * with_kzkfg = ld_with_kzkfg IMPORTING return = ld_return TABLES items = it_items texts = it_texts * prices = it_prices . " BAPI_ADV_MED_GET_ITEMS
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_return  TYPE BAPIRETURN ,
ld_catalog  TYPE BAPIADMID-PRODCAT ,
it_items  TYPE STANDARD TABLE OF BAPILAYIT ,
wa_items  LIKE LINE OF it_items,
ld_variant  TYPE BAPIADMVID-VARIANT ,
it_texts  TYPE STANDARD TABLE OF BAPILAYTX ,
wa_texts  LIKE LINE OF it_texts,
ld_area  TYPE BAPILAYA-AREA ,
it_prices  TYPE STANDARD TABLE OF BAPIADMIP ,
wa_prices  LIKE LINE OF it_prices,
ld_with_prices  TYPE BAPILAYHLP-XFELD ,
ld_with_kzkfg  TYPE BAPILAYHLP-XFELD .


ld_catalog = some text here

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

ld_variant = some text here

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

ld_area = Check type of data required

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

ld_with_prices = some text here

ld_with_kzkfg = some text here

SAP Documentation for FM BAPI_ADV_MED_GET_ITEMS


This method returns items for an advertising medium.

EXAMPLE ...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_ITEMS or its description.