SAP K_ALLOCATIONS_RUN Function Module for









K_ALLOCATIONS_RUN is a standard k allocations run SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 k allocations run FM, simply by entering the name K_ALLOCATIONS_RUN into the relevant SAP transaction such as SE37 or SE38.

Function Group: KGA2
Program Name: SAPLKGA2
Main Program: SAPLKGA2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K_ALLOCATIONS_RUN 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 'K_ALLOCATIONS_RUN'"
EXPORTING
IRKGA2U = "Transfer structure processing para
IRKGA2U2 = "
IRKGA2VAR = "
* IRKGA2WF = "
* TITLE = ' ' "Heading text
GROUP = "Company unit for lock
* KUMUFLAG = ' ' "
* RCKUMUFLAG = ' ' "
* IRKGA2P = "

CHANGING
* IRKGA2EXT = "

TABLES
IT811CT = "Table of the cycles incl. text
ITRKGA2H = "
* BPL = "

EXCEPTIONS
CANCELED = 1 FOREIGN_LOCK_REPORT = 2 FOREIGN_LOCK_REV = 3 NO_CYCLE = 4
.



IMPORTING Parameters details for K_ALLOCATIONS_RUN

IRKGA2U - Transfer structure processing para

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

IRKGA2U2 -

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

IRKGA2VAR -

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

IRKGA2WF -

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

TITLE - Heading text

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

GROUP - Company unit for lock

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

KUMUFLAG -

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

RCKUMUFLAG -

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

IRKGA2P -

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

CHANGING Parameters details for K_ALLOCATIONS_RUN

IRKGA2EXT -

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

TABLES Parameters details for K_ALLOCATIONS_RUN

IT811CT - Table of the cycles incl. text

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

ITRKGA2H -

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

BPL -

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

EXCEPTIONS details

CANCELED - Processing cancelled after control query

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

FOREIGN_LOCK_REPORT - Enqueue lock for generated report

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

FOREIGN_LOCK_REV - Enqueue lock for cancelled data

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

NO_CYCLE - Cycle table is empty

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

Copy and paste ABAP code example for K_ALLOCATIONS_RUN 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_irkga2u  TYPE RKGA2U, "   
lt_it811ct  TYPE STANDARD TABLE OF T811CT, "   
lv_canceled  TYPE T811CT, "   
lv_irkga2ext  TYPE RKGA2EXT, "   
lv_irkga2u2  TYPE RKGA2U2, "   
lt_itrkga2h  TYPE STANDARD TABLE OF RKGA2H, "   
lv_foreign_lock_report  TYPE RKGA2H, "   
lt_bpl  TYPE STANDARD TABLE OF RKGABPL, "   
lv_irkga2var  TYPE RKGA2VAR, "   
lv_foreign_lock_rev  TYPE RKGA2VAR, "   
lv_irkga2wf  TYPE RKGA2WF, "   
lv_no_cycle  TYPE RKGA2WF, "   
lv_title  TYPE RKGA2WF, "   SPACE
lv_group  TYPE RKGA2WF, "   
lv_kumuflag  TYPE T811C-KUMUFLAG, "   SPACE
lv_rckumuflag  TYPE T811C-RCKUMUFLAG, "   SPACE
lv_irkga2p  TYPE RKGA2P. "   

  CALL FUNCTION 'K_ALLOCATIONS_RUN'  "
    EXPORTING
         IRKGA2U = lv_irkga2u
         IRKGA2U2 = lv_irkga2u2
         IRKGA2VAR = lv_irkga2var
         IRKGA2WF = lv_irkga2wf
         TITLE = lv_title
         GROUP = lv_group
         KUMUFLAG = lv_kumuflag
         RCKUMUFLAG = lv_rckumuflag
         IRKGA2P = lv_irkga2p
    CHANGING
         IRKGA2EXT = lv_irkga2ext
    TABLES
         IT811CT = lt_it811ct
         ITRKGA2H = lt_itrkga2h
         BPL = lt_bpl
    EXCEPTIONS
        CANCELED = 1
        FOREIGN_LOCK_REPORT = 2
        FOREIGN_LOCK_REV = 3
        NO_CYCLE = 4
. " K_ALLOCATIONS_RUN




ABAP code using 7.40 inline data declarations to call FM K_ALLOCATIONS_RUN

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_title) = ' '.
 
 
"SELECT single KUMUFLAG FROM T811C INTO @DATA(ld_kumuflag).
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!