SAP BAPI_PROMO_GETDETAIL Function Module for Detailed Data for a Promotion









BAPI_PROMO_GETDETAIL is a standard bapi promo getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Detailed Data for a Promotion 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 getdetail FM, simply by entering the name BAPI_PROMO_GETDETAIL 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_GETDETAIL 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_GETDETAIL'"Detailed Data for a Promotion
EXPORTING
PROMOTION = "Promotion
* LANGU = "Language Key
* LANGU_ISO = "Language According to ISO 639

IMPORTING
PROMOTION_HEADER = "Promotion Header Data
PROMOTION_HEADER_NEW = "Structure: Promotion Header Data (GetDetail-BAPI)

TABLES
* MATERIAL_RANGE = "Range Table for Material
* RETURN = "Return Parameter(s)
* EXTENSIONIN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSIONOUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* THEME_RANGE = "Range Table for Promotion Themes
* MATL_GROUP_RANGE = "Range Table for Material Groups
* TEXTS = "Promotion Descriptions
* ITEMS = "Item Data
* DISCOUNTS = "Promotion Discounts
* THEMES = "Promotion Themes
* PLANTGROUPS = "Plant Groups
* PLANTS = "Table Parameter: Plants (Changeable)
.



IMPORTING Parameters details for BAPI_PROMO_GETDETAIL

PROMOTION - Promotion

Data type: BAPI1068I1-PROMOTION
Optional: No
Call by Reference: No ( called with pass by value option)

LANGU - Language Key

Data type: BAPI1068I1-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU_ISO - Language According to ISO 639

Data type: BAPI1068I1-LANGUP_ISO
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_PROMO_GETDETAIL

PROMOTION_HEADER - Promotion Header Data

Data type: BAPI1068E3
Optional: No
Call by Reference: No ( called with pass by value option)

PROMOTION_HEADER_NEW - Structure: Promotion Header Data (GetDetail-BAPI)

Data type: BAPI1068E3_NEW
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_PROMO_GETDETAIL

MATERIAL_RANGE - Range Table for Material

Data type: BAPI1068T5
Optional: Yes
Call by Reference: Yes

RETURN - Return Parameter(s)

Data type: BAPIRET2
Optional: Yes
Call by Reference: Yes

EXTENSIONIN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut

Data type: BAPIPAREX
Optional: Yes
Call by Reference: Yes

EXTENSIONOUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut

Data type: BAPIPAREX
Optional: Yes
Call by Reference: Yes

THEME_RANGE - Range Table for Promotion Themes

Data type: BAPI1068T18
Optional: Yes
Call by Reference: Yes

MATL_GROUP_RANGE - Range Table for Material Groups

Data type: BAPI1068T4
Optional: Yes
Call by Reference: Yes

TEXTS - Promotion Descriptions

Data type: BAPI1068T29
Optional: Yes
Call by Reference: Yes

ITEMS - Item Data

Data type: BAPI1068T19
Optional: Yes
Call by Reference: Yes

DISCOUNTS - Promotion Discounts

Data type: BAPI1068T30
Optional: Yes
Call by Reference: Yes

THEMES - Promotion Themes

Data type: BAPI1068T20
Optional: Yes
Call by Reference: Yes

PLANTGROUPS - Plant Groups

Data type: BAPI1068T21
Optional: Yes
Call by Reference: Yes

PLANTS - Table Parameter: Plants (Changeable)

Data type: BAPI1068T25
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_PROMO_GETDETAIL 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_promotion  TYPE BAPI1068I1-PROMOTION, "   
lt_material_range  TYPE STANDARD TABLE OF BAPI1068T5, "   
lv_promotion_header  TYPE BAPI1068E3, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_extensionout  TYPE STANDARD TABLE OF BAPIPAREX, "   
lv_langu  TYPE BAPI1068I1-LANGU, "   
lt_theme_range  TYPE STANDARD TABLE OF BAPI1068T18, "   
lv_promotion_header_new  TYPE BAPI1068E3_NEW, "   
lv_langu_iso  TYPE BAPI1068I1-LANGUP_ISO, "   
lt_matl_group_range  TYPE STANDARD TABLE OF BAPI1068T4, "   
lt_texts  TYPE STANDARD TABLE OF BAPI1068T29, "   
lt_items  TYPE STANDARD TABLE OF BAPI1068T19, "   
lt_discounts  TYPE STANDARD TABLE OF BAPI1068T30, "   
lt_themes  TYPE STANDARD TABLE OF BAPI1068T20, "   
lt_plantgroups  TYPE STANDARD TABLE OF BAPI1068T21, "   
lt_plants  TYPE STANDARD TABLE OF BAPI1068T25. "   

  CALL FUNCTION 'BAPI_PROMO_GETDETAIL'  "Detailed Data for a Promotion
    EXPORTING
         PROMOTION = lv_promotion
         LANGU = lv_langu
         LANGU_ISO = lv_langu_iso
    IMPORTING
         PROMOTION_HEADER = lv_promotion_header
         PROMOTION_HEADER_NEW = lv_promotion_header_new
    TABLES
         MATERIAL_RANGE = lt_material_range
         RETURN = lt_return
         EXTENSIONIN = lt_extensionin
         EXTENSIONOUT = lt_extensionout
         THEME_RANGE = lt_theme_range
         MATL_GROUP_RANGE = lt_matl_group_range
         TEXTS = lt_texts
         ITEMS = lt_items
         DISCOUNTS = lt_discounts
         THEMES = lt_themes
         PLANTGROUPS = lt_plantgroups
         PLANTS = lt_plants
. " BAPI_PROMO_GETDETAIL




ABAP code using 7.40 inline data declarations to call FM BAPI_PROMO_GETDETAIL

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 PROMOTION FROM BAPI1068I1 INTO @DATA(ld_promotion).
 
 
 
 
 
 
"SELECT single LANGU FROM BAPI1068I1 INTO @DATA(ld_langu).
 
 
 
"SELECT single LANGUP_ISO FROM BAPI1068I1 INTO @DATA(ld_langu_iso).
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!