SAP Function Modules

BAPI_PROMO_GETANNOUNCEDLIST SAP Function module - List of Promotions for a Plant







BAPI_PROMO_GETANNOUNCEDLIST 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_PROMO_GETANNOUNCEDLIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BAPIS1068
Released Date: 08.06.1998
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_PROMO_GETANNOUNCEDLIST - BAPI PROMO GETANNOUNCEDLIST





CALL FUNCTION 'BAPI_PROMO_GETANNOUNCEDLIST' "List of Promotions for a Plant
* EXPORTING
*   plant_customer =            " bapi1068i1-plant_customer  Customer Number of Plant
*   plant =                     " bapi1068i1-plant  Plant Number
*   promotion =                 " bapi1068i1-promotion  Promotion Number
*   sales_date_from =           " bapi1068i1-sales_date_from  Start of Sales Period
*   sales_date_to =             " bapi1068i1-sales_date_to  End of Sales Period
*   langu =                     " bapi1068i1-langu  Language
*   langu_iso =                 " bapi1068i1-langup_iso  Language in ISO Code
  TABLES
    promotionlist =             " bapi1068t1    List of Promotions
*   department_range =          " bapi1068t3    Selection Criterion - Departments
*   matl_group_range =          " bapi1068t4    Selection Criterion - Material Groups
*   material_range =            " bapi1068t5    Selection Criterion - Materials
    return =                    " bapiret2      Error Messages
    .  "  BAPI_PROMO_GETANNOUNCEDLIST

ABAP code example for Function Module BAPI_PROMO_GETANNOUNCEDLIST





The ABAP code below is a full code listing to execute function module BAPI_PROMO_GETANNOUNCEDLIST 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:
it_promotionlist  TYPE STANDARD TABLE OF BAPI1068T1,"TABLES PARAM
wa_promotionlist  LIKE LINE OF it_promotionlist ,
it_department_range  TYPE STANDARD TABLE OF BAPI1068T3,"TABLES PARAM
wa_department_range  LIKE LINE OF it_department_range ,
it_matl_group_range  TYPE STANDARD TABLE OF BAPI1068T4,"TABLES PARAM
wa_matl_group_range  LIKE LINE OF it_matl_group_range ,
it_material_range  TYPE STANDARD TABLE OF BAPI1068T5,"TABLES PARAM
wa_material_range  LIKE LINE OF it_material_range ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_plant_customer) = some text here

DATA(ld_plant) = some text here

DATA(ld_promotion) = some text here

DATA(ld_sales_date_from) = 20210129

DATA(ld_sales_date_to) = 20210129

DATA(ld_langu) = Check type of data required

DATA(ld_langu_iso) = some text here

"populate fields of struture and append to itab
append wa_promotionlist to it_promotionlist.

"populate fields of struture and append to itab
append wa_department_range to it_department_range.

"populate fields of struture and append to itab
append wa_matl_group_range to it_matl_group_range.

"populate fields of struture and append to itab
append wa_material_range to it_material_range.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_PROMO_GETANNOUNCEDLIST' * EXPORTING * plant_customer = ld_plant_customer * plant = ld_plant * promotion = ld_promotion * sales_date_from = ld_sales_date_from * sales_date_to = ld_sales_date_to * langu = ld_langu * langu_iso = ld_langu_iso TABLES promotionlist = it_promotionlist * department_range = it_department_range * matl_group_range = it_matl_group_range * material_range = it_material_range return = it_return . " BAPI_PROMO_GETANNOUNCEDLIST
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_plant_customer  TYPE BAPI1068I1-PLANT_CUSTOMER ,
it_promotionlist  TYPE STANDARD TABLE OF BAPI1068T1 ,
wa_promotionlist  LIKE LINE OF it_promotionlist,
ld_plant  TYPE BAPI1068I1-PLANT ,
it_department_range  TYPE STANDARD TABLE OF BAPI1068T3 ,
wa_department_range  LIKE LINE OF it_department_range,
ld_promotion  TYPE BAPI1068I1-PROMOTION ,
it_matl_group_range  TYPE STANDARD TABLE OF BAPI1068T4 ,
wa_matl_group_range  LIKE LINE OF it_matl_group_range,
ld_sales_date_from  TYPE BAPI1068I1-SALES_DATE_FROM ,
it_material_range  TYPE STANDARD TABLE OF BAPI1068T5 ,
wa_material_range  LIKE LINE OF it_material_range,
ld_sales_date_to  TYPE BAPI1068I1-SALES_DATE_TO ,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
ld_langu  TYPE BAPI1068I1-LANGU ,
ld_langu_iso  TYPE BAPI1068I1-LANGUP_ISO .


ld_plant_customer = some text here

"populate fields of struture and append to itab
append wa_promotionlist to it_promotionlist.

ld_plant = some text here

"populate fields of struture and append to itab
append wa_department_range to it_department_range.

ld_promotion = some text here

"populate fields of struture and append to itab
append wa_matl_group_range to it_matl_group_range.

ld_sales_date_from = 20210129

"populate fields of struture and append to itab
append wa_material_range to it_material_range.

ld_sales_date_to = 20210129

"populate fields of struture and append to itab
append wa_return to it_return.

ld_langu = Check type of data required

ld_langu_iso = some text here

SAP Documentation for FM BAPI_PROMO_GETANNOUNCEDLIST


This method is used to determine the promotions for a plant. The promotions can be selected by entering a sales period and the materials ...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_PROMO_GETANNOUNCEDLIST or its description.