SAP K_UNITCOSTING_CUSTOMIZING_READ Function Module for









K_UNITCOSTING_CUSTOMIZING_READ is a standard k unitcosting customizing read 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 unitcosting customizing read FM, simply by entering the name K_UNITCOSTING_CUSTOMIZING_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function K_UNITCOSTING_CUSTOMIZING_READ 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_UNITCOSTING_CUSTOMIZING_READ'"
EXPORTING
KOKRS_IMP = "
GJAHR_IMP = "
KLVAR_IMP = "
* TVERS_IMP = "
* WERKS_IMP = "
* KADAT_IMP = "
* FLG_SET_KLVAR_FOR_VALUATION = 0 "

IMPORTING
TKA01_EXP = "
FLG_ALL_CURR_ACTIVE = "
KKEA1_EXP = "
BWVAR_EXP = "
TXOBJ = "
TXKLVAR = "

EXCEPTIONS
KOKRS_NOT_FOUND = 1 RECORD_NOT_FOUND_TCK01 = 2 RECORD_NOT_FOUND_TCK03 = 3 RECORD_NOT_FOUND_TCK05 = 4 RECORD_NOT_FOUND_TCK07 = 5 RECORD_NOT_FOUND_TCK22 = 6
.



IMPORTING Parameters details for K_UNITCOSTING_CUSTOMIZING_READ

KOKRS_IMP -

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

GJAHR_IMP -

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

KLVAR_IMP -

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

TVERS_IMP -

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

WERKS_IMP -

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

KADAT_IMP -

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

FLG_SET_KLVAR_FOR_VALUATION -

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

EXPORTING Parameters details for K_UNITCOSTING_CUSTOMIZING_READ

TKA01_EXP -

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

FLG_ALL_CURR_ACTIVE -

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

KKEA1_EXP -

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

BWVAR_EXP -

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

TXOBJ -

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

TXKLVAR -

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

EXCEPTIONS details

KOKRS_NOT_FOUND -

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

RECORD_NOT_FOUND_TCK01 -

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

RECORD_NOT_FOUND_TCK03 -

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

RECORD_NOT_FOUND_TCK05 -

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

RECORD_NOT_FOUND_TCK07 -

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

RECORD_NOT_FOUND_TCK22 -

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

Copy and paste ABAP code example for K_UNITCOSTING_CUSTOMIZING_READ 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_kokrs_imp  TYPE RK70S-KOKRS, "   
lv_tka01_exp  TYPE TKA01, "   
lv_kokrs_not_found  TYPE TKA01, "   
lv_gjahr_imp  TYPE RK70S-GJAHR, "   
lv_flg_all_curr_active  TYPE KKEK0_BOOLEAN, "   
lv_record_not_found_tck01  TYPE KKEK0_BOOLEAN, "   
lv_kkea1_exp  TYPE KKEA1, "   
lv_klvar_imp  TYPE RK70S-KLVAR, "   
lv_record_not_found_tck03  TYPE RK70S, "   
lv_bwvar_exp  TYPE KHS1-BWVAR, "   
lv_tvers_imp  TYPE RK70S-TVERS, "   
lv_record_not_found_tck05  TYPE RK70S, "   
lv_txobj  TYPE TCK23-TXKLA, "   
lv_werks_imp  TYPE RK70S-WERKS, "   
lv_record_not_found_tck07  TYPE RK70S, "   
lv_txklvar  TYPE TCK04-TXKLV, "   
lv_kadat_imp  TYPE RK70S-KADAT, "   
lv_record_not_found_tck22  TYPE RK70S, "   
lv_flg_set_klvar_for_valuation  TYPE KKEK0_BOOLEAN. "   0

  CALL FUNCTION 'K_UNITCOSTING_CUSTOMIZING_READ'  "
    EXPORTING
         KOKRS_IMP = lv_kokrs_imp
         GJAHR_IMP = lv_gjahr_imp
         KLVAR_IMP = lv_klvar_imp
         TVERS_IMP = lv_tvers_imp
         WERKS_IMP = lv_werks_imp
         KADAT_IMP = lv_kadat_imp
         FLG_SET_KLVAR_FOR_VALUATION = lv_flg_set_klvar_for_valuation
    IMPORTING
         TKA01_EXP = lv_tka01_exp
         FLG_ALL_CURR_ACTIVE = lv_flg_all_curr_active
         KKEA1_EXP = lv_kkea1_exp
         BWVAR_EXP = lv_bwvar_exp
         TXOBJ = lv_txobj
         TXKLVAR = lv_txklvar
    EXCEPTIONS
        KOKRS_NOT_FOUND = 1
        RECORD_NOT_FOUND_TCK01 = 2
        RECORD_NOT_FOUND_TCK03 = 3
        RECORD_NOT_FOUND_TCK05 = 4
        RECORD_NOT_FOUND_TCK07 = 5
        RECORD_NOT_FOUND_TCK22 = 6
. " K_UNITCOSTING_CUSTOMIZING_READ




ABAP code using 7.40 inline data declarations to call FM K_UNITCOSTING_CUSTOMIZING_READ

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 KOKRS FROM RK70S INTO @DATA(ld_kokrs_imp).
 
 
 
"SELECT single GJAHR FROM RK70S INTO @DATA(ld_gjahr_imp).
 
 
 
 
"SELECT single KLVAR FROM RK70S INTO @DATA(ld_klvar_imp).
 
 
"SELECT single BWVAR FROM KHS1 INTO @DATA(ld_bwvar_exp).
 
"SELECT single TVERS FROM RK70S INTO @DATA(ld_tvers_imp).
 
 
"SELECT single TXKLA FROM TCK23 INTO @DATA(ld_txobj).
 
"SELECT single WERKS FROM RK70S INTO @DATA(ld_werks_imp).
 
 
"SELECT single TXKLV FROM TCK04 INTO @DATA(ld_txklvar).
 
"SELECT single KADAT FROM RK70S INTO @DATA(ld_kadat_imp).
 
 
 


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!