SAP CK_F_MATERIAL_CALC Function Module for









CK_F_MATERIAL_CALC is a standard ck f material calc 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 ck f material calc FM, simply by entering the name CK_F_MATERIAL_CALC into the relevant SAP transaction such as SE37 or SE38.

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



Function CK_F_MATERIAL_CALC 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 'CK_F_MATERIAL_CALC'"
EXPORTING
* KLVAR = "
* PLNAL = "Alternative task list
* KADAT = "Valid-From Date
* BIDAT = "Valid-To Date
* ALDAT = "
* BWDAT = "
* UEBID = "Transfer Control
* KALNR_BA = "
* KALSM = "Costing Sheet for Calculating Overhead
* S_DUNKEL = ' ' "Background Processing
* S_UPDATE = 'A' "
* MATNR = "Material
* S_NO_COMMIT = ' ' "
* S_REPETITIVE = ' ' "
* S_SNGL_LOCK = 'X' "
* U_KALSM = ' ' "
* WERKS = "Plant
* LOSGR = "
* TVERS = "
* STLAN = "BOM Usage
* STALT = "Alternative BOM
* PLNTY = "
* PLNNR = "Task List Number

IMPORTING
F_KEKO_EXP = "

TABLES
* T_KEPH_EXP = "

EXCEPTIONS
WRONG_CALL = 1 KEPH_NOT_FOUND = 2 LOCKED = 3
.



IMPORTING Parameters details for CK_F_MATERIAL_CALC

KLVAR -

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

PLNAL - Alternative task list

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

KADAT - Valid-From Date

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

BIDAT - Valid-To Date

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

ALDAT -

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

BWDAT -

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

UEBID - Transfer Control

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

KALNR_BA -

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

KALSM - Costing Sheet for Calculating Overhead

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

S_DUNKEL - Background Processing

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

S_UPDATE -

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

MATNR - Material

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

S_NO_COMMIT -

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

S_REPETITIVE -

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

S_SNGL_LOCK -

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

U_KALSM -

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

WERKS - Plant

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

LOSGR -

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

TVERS -

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

STLAN - BOM Usage

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

STALT - Alternative BOM

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

PLNTY -

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

PLNNR - Task List Number

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

EXPORTING Parameters details for CK_F_MATERIAL_CALC

F_KEKO_EXP -

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

TABLES Parameters details for CK_F_MATERIAL_CALC

T_KEPH_EXP -

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

EXCEPTIONS details

WRONG_CALL -

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

KEPH_NOT_FOUND -

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

LOCKED - Cost estimate is locked

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CK_F_MATERIAL_CALC 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_klvar  TYPE KEKO-KLVAR, "   
lv_f_keko_exp  TYPE KEKO, "   
lt_t_keph_exp  TYPE STANDARD TABLE OF KEPH, "   
lv_wrong_call  TYPE KEPH, "   
lv_plnal  TYPE CKI64A-PLNAL, "   
lv_kadat  TYPE CKI64A-KADAT, "   
lv_bidat  TYPE CKI64A-BIDAT, "   
lv_aldat  TYPE CKI64A-ALDAT, "   
lv_bwdat  TYPE CKI64A-BWDAT, "   
lv_uebid  TYPE CKI64A-UEBID, "   
lv_kalnr_ba  TYPE CKI64A-KALNR_BA, "   
lv_kalsm  TYPE KEKO-KALSM, "   
lv_s_dunkel  TYPE C, "   SPACE
lv_s_update  TYPE C, "   'A'
lv_matnr  TYPE MARA-MATNR, "   
lv_keph_not_found  TYPE MARA, "   
lv_s_no_commit  TYPE C, "   SPACE
lv_s_repetitive  TYPE C, "   SPACE
lv_s_sngl_lock  TYPE C, "   'X'
lv_u_kalsm  TYPE XFELD, "   SPACE
lv_werks  TYPE MARC-WERKS, "   
lv_locked  TYPE MARC, "   
lv_losgr  TYPE KEKO-LOSGR, "   
lv_tvers  TYPE KEKO-TVERS, "   
lv_stlan  TYPE CKI64A-STLAN, "   
lv_stalt  TYPE CKI64A-STALT, "   
lv_plnty  TYPE CKI64A-PLNTY, "   
lv_plnnr  TYPE CKI64A-PLNNR. "   

  CALL FUNCTION 'CK_F_MATERIAL_CALC'  "
    EXPORTING
         KLVAR = lv_klvar
         PLNAL = lv_plnal
         KADAT = lv_kadat
         BIDAT = lv_bidat
         ALDAT = lv_aldat
         BWDAT = lv_bwdat
         UEBID = lv_uebid
         KALNR_BA = lv_kalnr_ba
         KALSM = lv_kalsm
         S_DUNKEL = lv_s_dunkel
         S_UPDATE = lv_s_update
         MATNR = lv_matnr
         S_NO_COMMIT = lv_s_no_commit
         S_REPETITIVE = lv_s_repetitive
         S_SNGL_LOCK = lv_s_sngl_lock
         U_KALSM = lv_u_kalsm
         WERKS = lv_werks
         LOSGR = lv_losgr
         TVERS = lv_tvers
         STLAN = lv_stlan
         STALT = lv_stalt
         PLNTY = lv_plnty
         PLNNR = lv_plnnr
    IMPORTING
         F_KEKO_EXP = lv_f_keko_exp
    TABLES
         T_KEPH_EXP = lt_t_keph_exp
    EXCEPTIONS
        WRONG_CALL = 1
        KEPH_NOT_FOUND = 2
        LOCKED = 3
. " CK_F_MATERIAL_CALC




ABAP code using 7.40 inline data declarations to call FM CK_F_MATERIAL_CALC

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 KLVAR FROM KEKO INTO @DATA(ld_klvar).
 
 
 
 
"SELECT single PLNAL FROM CKI64A INTO @DATA(ld_plnal).
 
"SELECT single KADAT FROM CKI64A INTO @DATA(ld_kadat).
 
"SELECT single BIDAT FROM CKI64A INTO @DATA(ld_bidat).
 
"SELECT single ALDAT FROM CKI64A INTO @DATA(ld_aldat).
 
"SELECT single BWDAT FROM CKI64A INTO @DATA(ld_bwdat).
 
"SELECT single UEBID FROM CKI64A INTO @DATA(ld_uebid).
 
"SELECT single KALNR_BA FROM CKI64A INTO @DATA(ld_kalnr_ba).
 
"SELECT single KALSM FROM KEKO INTO @DATA(ld_kalsm).
 
DATA(ld_s_dunkel) = ' '.
 
DATA(ld_s_update) = 'A'.
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_matnr).
 
 
DATA(ld_s_no_commit) = ' '.
 
DATA(ld_s_repetitive) = ' '.
 
DATA(ld_s_sngl_lock) = 'X'.
 
DATA(ld_u_kalsm) = ' '.
 
"SELECT single WERKS FROM MARC INTO @DATA(ld_werks).
 
 
"SELECT single LOSGR FROM KEKO INTO @DATA(ld_losgr).
 
"SELECT single TVERS FROM KEKO INTO @DATA(ld_tvers).
 
"SELECT single STLAN FROM CKI64A INTO @DATA(ld_stlan).
 
"SELECT single STALT FROM CKI64A INTO @DATA(ld_stalt).
 
"SELECT single PLNTY FROM CKI64A INTO @DATA(ld_plnty).
 
"SELECT single PLNNR FROM CKI64A INTO @DATA(ld_plnnr).
 


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!