SAP PROMOTION_READ Function Module for Read All Promotion Tables
PROMOTION_READ is a standard promotion read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read All Promotion Tables 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 promotion read FM, simply by entering the name PROMOTION_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: WAK1
Program Name: SAPLWAK1
Main Program: SAPLWAK1
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PROMOTION_READ 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 'PROMOTION_READ'"Read All Promotion Tables.
EXPORTING
FAKTNR = "Promotion number
* FAKTYP = A "
* FLANGU = "
* F_NO_AUTHCHECK_HEADER = "
* F_NO_AUTHCHECK_ITEMS = "
* F_NO_AUTHCHECK_THEMES = "
* F_NO_WALEREAD = "
* IV_REFRESH_BADIS = ' ' "
* IV_DET_BBY_ASSGNMENT = "
IMPORTING
FWAKHD = "
FTWPA = "
TABLES
FXWAGUD = "
* FXWAKRD = "Promotion Discounts
* FXWAKRWD = "Promotion Discounts by Plant
FXWAKPD = "
FXWAKTD = "
FXWAZBD = "
FXWAZTD = "
FXWAZWD = "
FXWALED = "
FXWWMITD = "
* FXWAKCD = "
EXCEPTIONS
AUTHORITY_CHECK_ERROR = 1 NO_AUTHORITY = 2 PROMOTION_NOT_FOUND = 3 NO_PROMOTION_SUPPLIED = 4
IMPORTING Parameters details for PROMOTION_READ
FAKTNR - Promotion number
Data type: WAKH-AKTNROptional: No
Call by Reference: No ( called with pass by value option)
FAKTYP -
Data type: T180-TRTYPDefault: A
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLANGU -
Data type: SY-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
F_NO_AUTHCHECK_HEADER -
Data type: FLAGOptional: Yes
Call by Reference: Yes
F_NO_AUTHCHECK_ITEMS -
Data type: FLAGOptional: Yes
Call by Reference: Yes
F_NO_AUTHCHECK_THEMES -
Data type: FLAGOptional: Yes
Call by Reference: Yes
F_NO_WALEREAD -
Data type: FLAGOptional: Yes
Call by Reference: Yes
IV_REFRESH_BADIS -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: Yes
IV_DET_BBY_ASSGNMENT -
Data type: XFELDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PROMOTION_READ
FWAKHD -
Data type: WAKHDOptional: No
Call by Reference: No ( called with pass by value option)
FTWPA -
Data type: TWPAOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PROMOTION_READ
FXWAGUD -
Data type: WAGUDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAKRD - Promotion Discounts
Data type: WAKRDOptional: Yes
Call by Reference: Yes
FXWAKRWD - Promotion Discounts by Plant
Data type: WAKRWDOptional: Yes
Call by Reference: Yes
FXWAKPD -
Data type: WAKPDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAKTD -
Data type: WAKTDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAZBD -
Data type: WAZBDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAZTD -
Data type: WAZTDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAZWD -
Data type: WAZWDOptional: No
Call by Reference: No ( called with pass by value option)
FXWALED -
Data type: WALEDOptional: No
Call by Reference: No ( called with pass by value option)
FXWWMITD -
Data type: WWMITDOptional: No
Call by Reference: No ( called with pass by value option)
FXWAKCD -
Data type: WAKCDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
AUTHORITY_CHECK_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY - No authorization for this action
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROMOTION_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PROMOTION_SUPPLIED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for PROMOTION_READ 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_faktnr | TYPE WAKH-AKTNR, " | |||
| lv_fwakhd | TYPE WAKHD, " | |||
| lt_fxwagud | TYPE STANDARD TABLE OF WAGUD, " | |||
| lv_authority_check_error | TYPE WAGUD, " | |||
| lt_fxwakrd | TYPE STANDARD TABLE OF WAKRD, " | |||
| lt_fxwakrwd | TYPE STANDARD TABLE OF WAKRWD, " | |||
| lv_ftwpa | TYPE TWPA, " | |||
| lv_faktyp | TYPE T180-TRTYP, " A | |||
| lt_fxwakpd | TYPE STANDARD TABLE OF WAKPD, " | |||
| lv_no_authority | TYPE WAKPD, " | |||
| lv_flangu | TYPE SY-LANGU, " | |||
| lt_fxwaktd | TYPE STANDARD TABLE OF WAKTD, " | |||
| lv_promotion_not_found | TYPE WAKTD, " | |||
| lt_fxwazbd | TYPE STANDARD TABLE OF WAZBD, " | |||
| lv_f_no_authcheck_header | TYPE FLAG, " | |||
| lv_no_promotion_supplied | TYPE FLAG, " | |||
| lt_fxwaztd | TYPE STANDARD TABLE OF WAZTD, " | |||
| lv_f_no_authcheck_items | TYPE FLAG, " | |||
| lt_fxwazwd | TYPE STANDARD TABLE OF WAZWD, " | |||
| lv_f_no_authcheck_themes | TYPE FLAG, " | |||
| lt_fxwaled | TYPE STANDARD TABLE OF WALED, " | |||
| lv_f_no_waleread | TYPE FLAG, " | |||
| lt_fxwwmitd | TYPE STANDARD TABLE OF WWMITD, " | |||
| lv_iv_refresh_badis | TYPE XFELD, " ' ' | |||
| lt_fxwakcd | TYPE STANDARD TABLE OF WAKCD, " | |||
| lv_iv_det_bby_assgnment | TYPE XFELD. " |
|   CALL FUNCTION 'PROMOTION_READ' "Read All Promotion Tables |
| EXPORTING | ||
| FAKTNR | = lv_faktnr | |
| FAKTYP | = lv_faktyp | |
| FLANGU | = lv_flangu | |
| F_NO_AUTHCHECK_HEADER | = lv_f_no_authcheck_header | |
| F_NO_AUTHCHECK_ITEMS | = lv_f_no_authcheck_items | |
| F_NO_AUTHCHECK_THEMES | = lv_f_no_authcheck_themes | |
| F_NO_WALEREAD | = lv_f_no_waleread | |
| IV_REFRESH_BADIS | = lv_iv_refresh_badis | |
| IV_DET_BBY_ASSGNMENT | = lv_iv_det_bby_assgnment | |
| IMPORTING | ||
| FWAKHD | = lv_fwakhd | |
| FTWPA | = lv_ftwpa | |
| TABLES | ||
| FXWAGUD | = lt_fxwagud | |
| FXWAKRD | = lt_fxwakrd | |
| FXWAKRWD | = lt_fxwakrwd | |
| FXWAKPD | = lt_fxwakpd | |
| FXWAKTD | = lt_fxwaktd | |
| FXWAZBD | = lt_fxwazbd | |
| FXWAZTD | = lt_fxwaztd | |
| FXWAZWD | = lt_fxwazwd | |
| FXWALED | = lt_fxwaled | |
| FXWWMITD | = lt_fxwwmitd | |
| FXWAKCD | = lt_fxwakcd | |
| EXCEPTIONS | ||
| AUTHORITY_CHECK_ERROR = 1 | ||
| NO_AUTHORITY = 2 | ||
| PROMOTION_NOT_FOUND = 3 | ||
| NO_PROMOTION_SUPPLIED = 4 | ||
| . " PROMOTION_READ | ||
ABAP code using 7.40 inline data declarations to call FM PROMOTION_READ
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 AKTNR FROM WAKH INTO @DATA(ld_faktnr). | ||||
| "SELECT single TRTYP FROM T180 INTO @DATA(ld_faktyp). | ||||
| DATA(ld_faktyp) | = A. | |||
| "SELECT single LANGU FROM SY INTO @DATA(ld_flangu). | ||||
| DATA(ld_iv_refresh_badis) | = ' '. | |||
Search for further information about these or an SAP related objects