SAP BAPI_PROMO_GETLIST Function Module for List of Promotions
BAPI_PROMO_GETLIST is a standard bapi promo getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for List of Promotions 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 promo getlist FM, simply by entering the name BAPI_PROMO_GETLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: BAPIS1068
Program Name: SAPLBAPIS1068
Main Program: SAPLBAPIS1068
Appliation area:
Release date: 27-Jan-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_PROMO_GETLIST 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_PROMO_GETLIST'"List of Promotions.
EXPORTING
* MAXROWS = "Maximum Number of Lines of Hits
* LANGU = "Language Key
* LANGU_ISO = "Language According to ISO 639
* ON_SALE_FROM = "On Sale to Consumers From
* ON_SALE_TO = "On Sale To Consumers To
* ORDER_FROM = "Earliest Order Date
* ORDER_TO = "Latest Order Date
TABLES
* PROMOTION_RANGE = "Range Table for Promotion Number
* PROMOTION_TYPE_RANGE = "Range Table for Promotion Type
* PROMOTION_NAME_RANGE = "Range Table for Promotion Description
* SALES_ORG_RANGE = "Range Table for the Sales Organization in the Promotion Header Data
* DISTR_CHAN_RANGE = "Range Table for the Distribution Channel for the Promotion Header Data
* STATUS_RANGE = "Range Table for the Processing Status of the Promotion
* PROMOTIONLIST = "List of Promotions
* RETURN = "Return parameter
IMPORTING Parameters details for BAPI_PROMO_GETLIST
MAXROWS - Maximum Number of Lines of Hits
Data type: BAPI1068I1-MAXROWSOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGU - Language Key
Data type: BAPI1068I1-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGU_ISO - Language According to ISO 639
Data type: BAPI1068I1-LANGUP_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
ON_SALE_FROM - On Sale to Consumers From
Data type: BAPI1068I1-SALES_DATE_FROMOptional: Yes
Call by Reference: No ( called with pass by value option)
ON_SALE_TO - On Sale To Consumers To
Data type: BAPI1068I1-SALES_DATE_TOOptional: Yes
Call by Reference: No ( called with pass by value option)
ORDER_FROM - Earliest Order Date
Data type: BAPI1068I1-ORDER_FROMOptional: Yes
Call by Reference: No ( called with pass by value option)
ORDER_TO - Latest Order Date
Data type: BAPI1068I1-ORDER_TOOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_PROMO_GETLIST
PROMOTION_RANGE - Range Table for Promotion Number
Data type: BAPI1068T11Optional: Yes
Call by Reference: Yes
PROMOTION_TYPE_RANGE - Range Table for Promotion Type
Data type: BAPI1068T12Optional: Yes
Call by Reference: Yes
PROMOTION_NAME_RANGE - Range Table for Promotion Description
Data type: BAPI1068T13Optional: Yes
Call by Reference: Yes
SALES_ORG_RANGE - Range Table for the Sales Organization in the Promotion Header Data
Data type: BAPI1068T14Optional: Yes
Call by Reference: Yes
DISTR_CHAN_RANGE - Range Table for the Distribution Channel for the Promotion Header Data
Data type: BAPI1068T15Optional: Yes
Call by Reference: Yes
STATUS_RANGE - Range Table for the Processing Status of the Promotion
Data type: BAPI1068T16Optional: Yes
Call by Reference: Yes
PROMOTIONLIST - List of Promotions
Data type: BAPI1068T17Optional: Yes
Call by Reference: Yes
RETURN - Return parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_PROMO_GETLIST 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_maxrows | TYPE BAPI1068I1-MAXROWS, " | |||
| lt_promotion_range | TYPE STANDARD TABLE OF BAPI1068T11, " | |||
| lv_langu | TYPE BAPI1068I1-LANGU, " | |||
| lt_promotion_type_range | TYPE STANDARD TABLE OF BAPI1068T12, " | |||
| lv_langu_iso | TYPE BAPI1068I1-LANGUP_ISO, " | |||
| lt_promotion_name_range | TYPE STANDARD TABLE OF BAPI1068T13, " | |||
| lv_on_sale_from | TYPE BAPI1068I1-SALES_DATE_FROM, " | |||
| lt_sales_org_range | TYPE STANDARD TABLE OF BAPI1068T14, " | |||
| lv_on_sale_to | TYPE BAPI1068I1-SALES_DATE_TO, " | |||
| lt_distr_chan_range | TYPE STANDARD TABLE OF BAPI1068T15, " | |||
| lv_order_from | TYPE BAPI1068I1-ORDER_FROM, " | |||
| lt_status_range | TYPE STANDARD TABLE OF BAPI1068T16, " | |||
| lv_order_to | TYPE BAPI1068I1-ORDER_TO, " | |||
| lt_promotionlist | TYPE STANDARD TABLE OF BAPI1068T17, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2. " |
|   CALL FUNCTION 'BAPI_PROMO_GETLIST' "List of Promotions |
| EXPORTING | ||
| MAXROWS | = lv_maxrows | |
| LANGU | = lv_langu | |
| LANGU_ISO | = lv_langu_iso | |
| ON_SALE_FROM | = lv_on_sale_from | |
| ON_SALE_TO | = lv_on_sale_to | |
| ORDER_FROM | = lv_order_from | |
| ORDER_TO | = lv_order_to | |
| TABLES | ||
| PROMOTION_RANGE | = lt_promotion_range | |
| PROMOTION_TYPE_RANGE | = lt_promotion_type_range | |
| PROMOTION_NAME_RANGE | = lt_promotion_name_range | |
| SALES_ORG_RANGE | = lt_sales_org_range | |
| DISTR_CHAN_RANGE | = lt_distr_chan_range | |
| STATUS_RANGE | = lt_status_range | |
| PROMOTIONLIST | = lt_promotionlist | |
| RETURN | = lt_return | |
| . " BAPI_PROMO_GETLIST | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_PROMO_GETLIST
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 MAXROWS FROM BAPI1068I1 INTO @DATA(ld_maxrows). | ||||
| "SELECT single LANGU FROM BAPI1068I1 INTO @DATA(ld_langu). | ||||
| "SELECT single LANGUP_ISO FROM BAPI1068I1 INTO @DATA(ld_langu_iso). | ||||
| "SELECT single SALES_DATE_FROM FROM BAPI1068I1 INTO @DATA(ld_on_sale_from). | ||||
| "SELECT single SALES_DATE_TO FROM BAPI1068I1 INTO @DATA(ld_on_sale_to). | ||||
| "SELECT single ORDER_FROM FROM BAPI1068I1 INTO @DATA(ld_order_from). | ||||
| "SELECT single ORDER_TO FROM BAPI1068I1 INTO @DATA(ld_order_to). | ||||
Search for further information about these or an SAP related objects