SAP RK_KOKRS_FIND Function Module for









RK_KOKRS_FIND is a standard rk kokrs find 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 rk kokrs find FM, simply by entering the name RK_KOKRS_FIND into the relevant SAP transaction such as SE37 or SE38.

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



Function RK_KOKRS_FIND 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 'RK_KOKRS_FIND'"
EXPORTING
BUKRS = "Company code
* GSBER = ' ' "Business area
* TEST_KOKRS = ' ' "Controlling company code to be che
* NO_BUFFERING = ' ' "

IMPORTING
KOKRS = "Cost center group
T_KA01 = "Entry from TKA01 for controlling c

EXCEPTIONS
ASSIGNMENT_NOT_ALLOWED = 1 INSUFFICIENT_INPUT = 2 NO_KOKRS_ASSIGNED = 3 NO_KOKRS_FOR_BUKRS = 4 NO_KOKRS_FOR_BU_GB = 5 WRONG_KOKRS_FOR_BUKRS = 6 WRONG_KOKRS_FOR_BU_GB = 7
.



IMPORTING Parameters details for RK_KOKRS_FIND

BUKRS - Company code

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

GSBER - Business area

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

TEST_KOKRS - Controlling company code to be che

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

NO_BUFFERING -

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

EXPORTING Parameters details for RK_KOKRS_FIND

KOKRS - Cost center group

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

T_KA01 - Entry from TKA01 for controlling c

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

EXCEPTIONS details

ASSIGNMENT_NOT_ALLOWED - ContA may not be entered for CCode

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

INSUFFICIENT_INPUT - Cost center group cannot be dtermi

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

NO_KOKRS_ASSIGNED - No type of ContA determination spe

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

NO_KOKRS_FOR_BUKRS - No ContA allocated to CCode

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

NO_KOKRS_FOR_BU_GB - No ContA allocated to CCode and bu

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

WRONG_KOKRS_FOR_BUKRS - Test ContA is not allocated to CCo

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

WRONG_KOKRS_FOR_BU_GB - Test ContA is not allocated to CCo

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

Copy and paste ABAP code example for RK_KOKRS_FIND 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_bukrs  TYPE T001-BUKRS, "   
lv_kokrs  TYPE TKA01-KOKRS, "   
lv_assignment_not_allowed  TYPE TKA01, "   
lv_gsber  TYPE TKA02-GSBER, "   SPACE
lv_t_ka01  TYPE TKA01, "   
lv_insufficient_input  TYPE TKA01, "   
lv_test_kokrs  TYPE TKA02-KOKRS, "   SPACE
lv_no_kokrs_assigned  TYPE TKA02, "   
lv_no_buffering  TYPE SY-DATAR, "   SPACE
lv_no_kokrs_for_bukrs  TYPE SY, "   
lv_no_kokrs_for_bu_gb  TYPE SY, "   
lv_wrong_kokrs_for_bukrs  TYPE SY, "   
lv_wrong_kokrs_for_bu_gb  TYPE SY. "   

  CALL FUNCTION 'RK_KOKRS_FIND'  "
    EXPORTING
         BUKRS = lv_bukrs
         GSBER = lv_gsber
         TEST_KOKRS = lv_test_kokrs
         NO_BUFFERING = lv_no_buffering
    IMPORTING
         KOKRS = lv_kokrs
         T_KA01 = lv_t_ka01
    EXCEPTIONS
        ASSIGNMENT_NOT_ALLOWED = 1
        INSUFFICIENT_INPUT = 2
        NO_KOKRS_ASSIGNED = 3
        NO_KOKRS_FOR_BUKRS = 4
        NO_KOKRS_FOR_BU_GB = 5
        WRONG_KOKRS_FOR_BUKRS = 6
        WRONG_KOKRS_FOR_BU_GB = 7
. " RK_KOKRS_FIND




ABAP code using 7.40 inline data declarations to call FM RK_KOKRS_FIND

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 BUKRS FROM T001 INTO @DATA(ld_bukrs).
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_kokrs).
 
 
"SELECT single GSBER FROM TKA02 INTO @DATA(ld_gsber).
DATA(ld_gsber) = ' '.
 
 
 
"SELECT single KOKRS FROM TKA02 INTO @DATA(ld_test_kokrs).
DATA(ld_test_kokrs) = ' '.
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_no_buffering).
DATA(ld_no_buffering) = ' '.
 
 
 
 
 


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!