SAP ALLOCATION_RUN_REVERSE Function Module for Reversal of allocation runs









ALLOCATION_RUN_REVERSE is a standard allocation run reverse SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reversal of allocation runs 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 allocation run reverse FM, simply by entering the name ALLOCATION_RUN_REVERSE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RUN_ALLOCATION
Program Name: SAPLRUN_ALLOCATION
Main Program: SAPLRUN_ALLOCATION
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function ALLOCATION_RUN_REVERSE 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 'ALLOCATION_RUN_REVERSE'"Reversal of allocation runs
EXPORTING
IRKGA2U = "Transfer structure processing para
IV_RUN_NAME = "Allocation run name
IV_RUN_DATE = "Field of type DATS
IV_PERIV = "Fiscal Year Variant
IRKGA2VAR = "Allocations: Variable Run Transfer Fields (Part 2)
* REVERSE_BEFORE_RUN = ' ' "Calling up cancellation before act
TITLE = "Heading text
GROUP = "Company unit for lock
* KUMUFLAG = "Indicator: Cumulative Allocation
* RCKUMUFLAG = ' ' "Aggregated Processing Indicator (Only Tracing Factors)
* IRKGA2U2 = "Allocations: Run Transfer Fields (Part 3)
IV_RUN_ID = "Allocations: General ID

TABLES
IT811CT = "Table of the cycles

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for ALLOCATION_RUN_REVERSE

IRKGA2U - Transfer structure processing para

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

IV_RUN_NAME - Allocation run name

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

IV_RUN_DATE - Field of type DATS

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

IV_PERIV - Fiscal Year Variant

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

IRKGA2VAR - Allocations: Variable Run Transfer Fields (Part 2)

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

REVERSE_BEFORE_RUN - Calling up cancellation before act

Data type: STRING
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TITLE - Heading text

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

GROUP - Company unit for lock

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

KUMUFLAG - Indicator: Cumulative Allocation

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

RCKUMUFLAG - Aggregated Processing Indicator (Only Tracing Factors)

Data type: T811C-RCKUMUFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IRKGA2U2 - Allocations: Run Transfer Fields (Part 3)

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

IV_RUN_ID - Allocations: General ID

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

TABLES Parameters details for ALLOCATION_RUN_REVERSE

IT811CT - Table of the cycles

Data type: T811CT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ERROR -

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

Copy and paste ABAP code example for ALLOCATION_RUN_REVERSE 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_error  TYPE STRING, "   
lv_irkga2u  TYPE RKGA2U, "   
lt_it811ct  TYPE STANDARD TABLE OF T811CT, "   
lv_iv_run_name  TYPE ALLOC_RUN_NAME, "   
lv_iv_run_date  TYPE DATS, "   
lv_iv_periv  TYPE PERIV, "   
lv_irkga2var  TYPE RKGA2VAR, "   
lv_reverse_before_run  TYPE STRING, "   SPACE
lv_title  TYPE STRING, "   
lv_group  TYPE STRING, "   
lv_kumuflag  TYPE T811C-KUMUFLAG, "   
lv_rckumuflag  TYPE T811C-RCKUMUFLAG, "   SPACE
lv_irkga2u2  TYPE RKGA2U2, "   
lv_iv_run_id  TYPE ALLOC_RUN_ID. "   

  CALL FUNCTION 'ALLOCATION_RUN_REVERSE'  "Reversal of allocation runs
    EXPORTING
         IRKGA2U = lv_irkga2u
         IV_RUN_NAME = lv_iv_run_name
         IV_RUN_DATE = lv_iv_run_date
         IV_PERIV = lv_iv_periv
         IRKGA2VAR = lv_irkga2var
         REVERSE_BEFORE_RUN = lv_reverse_before_run
         TITLE = lv_title
         GROUP = lv_group
         KUMUFLAG = lv_kumuflag
         RCKUMUFLAG = lv_rckumuflag
         IRKGA2U2 = lv_irkga2u2
         IV_RUN_ID = lv_iv_run_id
    TABLES
         IT811CT = lt_it811ct
    EXCEPTIONS
        ERROR = 1
. " ALLOCATION_RUN_REVERSE




ABAP code using 7.40 inline data declarations to call FM ALLOCATION_RUN_REVERSE

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.

 
 
 
 
 
 
 
DATA(ld_reverse_before_run) = ' '.
 
 
 
"SELECT single KUMUFLAG FROM T811C INTO @DATA(ld_kumuflag).
 
"SELECT single RCKUMUFLAG FROM T811C INTO @DATA(ld_rckumuflag).
DATA(ld_rckumuflag) = ' '.
 
 
 


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!