SAP PROMOTION_READ_ITEMS Function Module for NOTRANSL: Lesen Aktionsdaten für Positionspflege
PROMOTION_READ_ITEMS is a standard promotion read items SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen Aktionsdaten für Positionspflege 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 items FM, simply by entering the name PROMOTION_READ_ITEMS 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_ITEMS 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_ITEMS'"NOTRANSL: Lesen Aktionsdaten für Positionspflege.
EXPORTING
FAKTNR = "Promotion number
* FAKTYP = A "
* FLANGU = "
* IV_READ_DISCOUNTS = ' ' "Checkbox
IMPORTING
FWAKHD = "
FTWPA = "
TABLES
FXWAGUD = "
FXWAKPD = "
FXWAKTD = "
FXWAZTD = "
* MATERIAL_RANGE = "Range Table for Material
* THEME_RANGE = "Range Table for Promotion Themes
* MATL_GROUP_RANGE = "
* FXWAKRD = "Screen Field Structure for Promotion Discount
EXCEPTIONS
AUTHORITY_CHECK_ERROR = 1 NO_AUTHORITY = 2 PROMOTION_NOT_FOUND = 3
IMPORTING Parameters details for PROMOTION_READ_ITEMS
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)
IV_READ_DISCOUNTS - Checkbox
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PROMOTION_READ_ITEMS
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_ITEMS
FXWAGUD -
Data type: WAGUDOptional: No
Call by Reference: No ( called with pass by value option)
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)
FXWAZTD -
Data type: WAZTDOptional: No
Call by Reference: No ( called with pass by value option)
MATERIAL_RANGE - Range Table for Material
Data type: BAPI1068T5Optional: Yes
Call by Reference: Yes
THEME_RANGE - Range Table for Promotion Themes
Data type: BAPI1068T18Optional: Yes
Call by Reference: Yes
MATL_GROUP_RANGE -
Data type: BAPI1068T4Optional: Yes
Call by Reference: Yes
FXWAKRD - Screen Field Structure for Promotion Discount
Data type: WAKRDOptional: Yes
Call by Reference: Yes
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)
Copy and paste ABAP code example for PROMOTION_READ_ITEMS 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, " | |||
| 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_fxwaztd | TYPE STANDARD TABLE OF WAZTD, " | |||
| lv_iv_read_discounts | TYPE XFELD, " ' ' | |||
| lt_material_range | TYPE STANDARD TABLE OF BAPI1068T5, " | |||
| lt_theme_range | TYPE STANDARD TABLE OF BAPI1068T18, " | |||
| lt_matl_group_range | TYPE STANDARD TABLE OF BAPI1068T4, " | |||
| lt_fxwakrd | TYPE STANDARD TABLE OF WAKRD. " |
|   CALL FUNCTION 'PROMOTION_READ_ITEMS' "NOTRANSL: Lesen Aktionsdaten für Positionspflege |
| EXPORTING | ||
| FAKTNR | = lv_faktnr | |
| FAKTYP | = lv_faktyp | |
| FLANGU | = lv_flangu | |
| IV_READ_DISCOUNTS | = lv_iv_read_discounts | |
| IMPORTING | ||
| FWAKHD | = lv_fwakhd | |
| FTWPA | = lv_ftwpa | |
| TABLES | ||
| FXWAGUD | = lt_fxwagud | |
| FXWAKPD | = lt_fxwakpd | |
| FXWAKTD | = lt_fxwaktd | |
| FXWAZTD | = lt_fxwaztd | |
| MATERIAL_RANGE | = lt_material_range | |
| THEME_RANGE | = lt_theme_range | |
| MATL_GROUP_RANGE | = lt_matl_group_range | |
| FXWAKRD | = lt_fxwakrd | |
| EXCEPTIONS | ||
| AUTHORITY_CHECK_ERROR = 1 | ||
| NO_AUTHORITY = 2 | ||
| PROMOTION_NOT_FOUND = 3 | ||
| . " PROMOTION_READ_ITEMS | ||
ABAP code using 7.40 inline data declarations to call FM PROMOTION_READ_ITEMS
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_read_discounts) | = ' '. | |||
Search for further information about these or an SAP related objects