SAP PROMOTION_FIND_ALLOCATIONRULE Function Module for NOTRANSL: Suche einer Aufteilregel anhand der Materialnr, WarenGrp und Lis
PROMOTION_FIND_ALLOCATIONRULE is a standard promotion find allocationrule 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: Suche einer Aufteilregel anhand der Materialnr, WarenGrp und Lis 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 find allocationrule FM, simply by entering the name PROMOTION_FIND_ALLOCATIONRULE 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_FIND_ALLOCATIONRULE 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_FIND_ALLOCATIONRULE'"NOTRANSL: Suche einer Aufteilregel anhand der Materialnr, WarenGrp und Lis.
EXPORTING
PI_I_WAKHD = "Promotion Header
PI_I_WAKPD = "Promotion item
* PI_DIALOG = "
IMPORTING
PE_I_SVKO = "
TABLES
* PT_SVKO = "
PT_WAGUD = "
PT_FILIALE = "
EXCEPTIONS
RULE_NOT_FOUND = 1
IMPORTING Parameters details for PROMOTION_FIND_ALLOCATIONRULE
PI_I_WAKHD - Promotion Header
Data type: WAKHDOptional: No
Call by Reference: No ( called with pass by value option)
PI_I_WAKPD - Promotion item
Data type: WAKPDOptional: No
Call by Reference: No ( called with pass by value option)
PI_DIALOG -
Data type: RWAKA-MEFLGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PROMOTION_FIND_ALLOCATIONRULE
PE_I_SVKO -
Data type: SVKOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PROMOTION_FIND_ALLOCATIONRULE
PT_SVKO -
Data type: SVKOOptional: Yes
Call by Reference: No ( called with pass by value option)
PT_WAGUD -
Data type: WAGUDOptional: No
Call by Reference: No ( called with pass by value option)
PT_FILIALE -
Data type: WAKWOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
RULE_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PROMOTION_FIND_ALLOCATIONRULE 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: | ||||
| lt_pt_svko | TYPE STANDARD TABLE OF SVKO, " | |||
| lv_pe_i_svko | TYPE SVKO, " | |||
| lv_pi_i_wakhd | TYPE WAKHD, " | |||
| lv_rule_not_found | TYPE WAKHD, " | |||
| lt_pt_wagud | TYPE STANDARD TABLE OF WAGUD, " | |||
| lv_pi_i_wakpd | TYPE WAKPD, " | |||
| lv_pi_dialog | TYPE RWAKA-MEFLG, " | |||
| lt_pt_filiale | TYPE STANDARD TABLE OF WAKW. " |
|   CALL FUNCTION 'PROMOTION_FIND_ALLOCATIONRULE' "NOTRANSL: Suche einer Aufteilregel anhand der Materialnr, WarenGrp und Lis |
| EXPORTING | ||
| PI_I_WAKHD | = lv_pi_i_wakhd | |
| PI_I_WAKPD | = lv_pi_i_wakpd | |
| PI_DIALOG | = lv_pi_dialog | |
| IMPORTING | ||
| PE_I_SVKO | = lv_pe_i_svko | |
| TABLES | ||
| PT_SVKO | = lt_pt_svko | |
| PT_WAGUD | = lt_pt_wagud | |
| PT_FILIALE | = lt_pt_filiale | |
| EXCEPTIONS | ||
| RULE_NOT_FOUND = 1 | ||
| . " PROMOTION_FIND_ALLOCATIONRULE | ||
ABAP code using 7.40 inline data declarations to call FM PROMOTION_FIND_ALLOCATIONRULE
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 MEFLG FROM RWAKA INTO @DATA(ld_pi_dialog). | ||||
Search for further information about these or an SAP related objects