SAP K_ALLOCATIONS_READ_VARIANT Function Module for









K_ALLOCATIONS_READ_VARIANT is a standard k allocations read variant 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 read variant FM, simply by entering the name K_ALLOCATIONS_READ_VARIANT 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_READ_VARIANT 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_READ_VARIANT'"
EXPORTING
* REPORT = 'RKGAL000' "
* TITLE = 'ALLOCATION' "
ACT_TAB = "
ACT_ALART = "
ACT_IPKNZ = "
ACT_APPL = "
ACT_GROUP = "

IMPORTING
IRKGA2 = "
IRKGA2U = "
IRKGA2U2 = "
IRKGA2VA = "
IRKGA2EX = "
IRKGA2WF = "
IRKGA2P = "

TABLES
IT811CT = "
ITRKGA2H = "

EXCEPTIONS
NO_VARIANT = 1
.



IMPORTING Parameters details for K_ALLOCATIONS_READ_VARIANT

REPORT -

Data type: SY-REPID
Default: 'RKGAL000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TITLE -

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

ACT_TAB -

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

ACT_ALART -

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

ACT_IPKNZ -

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

ACT_APPL -

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

ACT_GROUP -

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

EXPORTING Parameters details for K_ALLOCATIONS_READ_VARIANT

IRKGA2 -

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

IRKGA2U -

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

IRKGA2U2 -

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

IRKGA2VA -

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

IRKGA2EX -

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

IRKGA2WF -

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

IRKGA2P -

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

TABLES Parameters details for K_ALLOCATIONS_READ_VARIANT

IT811CT -

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)

EXCEPTIONS details

NO_VARIANT -

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

Copy and paste ABAP code example for K_ALLOCATIONS_READ_VARIANT 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_irkga2  TYPE RKGA2, "   
lv_report  TYPE SY-REPID, "   'RKGAL000'
lt_it811ct  TYPE STANDARD TABLE OF T811CT, "   
lv_no_variant  TYPE T811CT, "   
lv_title  TYPE T811CT, "   'ALLOCATION'
lv_irkga2u  TYPE RKGA2U, "   
lt_itrkga2h  TYPE STANDARD TABLE OF RKGA2H, "   
lv_act_tab  TYPE T811C-TAB, "   
lv_irkga2u2  TYPE RKGA2U2, "   
lv_irkga2va  TYPE RKGA2VAR, "   
lv_act_alart  TYPE T811C-ALART, "   
lv_irkga2ex  TYPE RKGA2EXT, "   
lv_act_ipknz  TYPE T811C-IPKNZ, "   
lv_act_appl  TYPE RKGA2U-APPL, "   
lv_irkga2wf  TYPE RKGA2WF, "   
lv_irkga2p  TYPE RKGA2P, "   
lv_act_group  TYPE RKGA2P. "   

  CALL FUNCTION 'K_ALLOCATIONS_READ_VARIANT'  "
    EXPORTING
         REPORT = lv_report
         TITLE = lv_title
         ACT_TAB = lv_act_tab
         ACT_ALART = lv_act_alart
         ACT_IPKNZ = lv_act_ipknz
         ACT_APPL = lv_act_appl
         ACT_GROUP = lv_act_group
    IMPORTING
         IRKGA2 = lv_irkga2
         IRKGA2U = lv_irkga2u
         IRKGA2U2 = lv_irkga2u2
         IRKGA2VA = lv_irkga2va
         IRKGA2EX = lv_irkga2ex
         IRKGA2WF = lv_irkga2wf
         IRKGA2P = lv_irkga2p
    TABLES
         IT811CT = lt_it811ct
         ITRKGA2H = lt_itrkga2h
    EXCEPTIONS
        NO_VARIANT = 1
. " K_ALLOCATIONS_READ_VARIANT




ABAP code using 7.40 inline data declarations to call FM K_ALLOCATIONS_READ_VARIANT

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 REPID FROM SY INTO @DATA(ld_report).
DATA(ld_report) = 'RKGAL000'.
 
 
 
DATA(ld_title) = 'ALLOCATION'.
 
 
 
"SELECT single TAB FROM T811C INTO @DATA(ld_act_tab).
 
 
 
"SELECT single ALART FROM T811C INTO @DATA(ld_act_alart).
 
 
"SELECT single IPKNZ FROM T811C INTO @DATA(ld_act_ipknz).
 
"SELECT single APPL FROM RKGA2U INTO @DATA(ld_act_appl).
 
 
 
 


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!