SAP CK_F_MAT_COST_SELECT Function Module for









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

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



Function CK_F_MAT_COST_SELECT 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_MAT_COST_SELECT'"
EXPORTING
* P_KOKRS = "
* S_ADDMIT = "
* S_EXTRA = "
* S_MIXOHN = "
* P_AMDAT = "
* S_KALKZ = "
* S_KALKL = "
* S_KALKV = "
* S_SONST = "
* S_DATUM = "
* S_ERZMIT = "
* S_ERZOHN = "

IMPORTING
ANZA_KEKO = "

TABLES
* T_MATNR = "
* T_WERKS = "
* T_CLASS = "
* T_TYPE = "
* T_WRKTYP = "
* T_KLVAR = "
* T_TVERS = "
* T_FEHSTA = "
* T_KEKO = "

EXCEPTIONS
WRONG_CALL_PLAN_SONST = 1 WRONG_CALL_MIT_OHNE_ADD = 2 WRONG_CALL_DATUM = 3 NO_DATA_FOUND = 4
.



IMPORTING Parameters details for CK_F_MAT_COST_SELECT

P_KOKRS -

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

S_ADDMIT -

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

S_EXTRA -

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

S_MIXOHN -

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

P_AMDAT -

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

S_KALKZ -

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

S_KALKL -

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

S_KALKV -

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

S_SONST -

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

S_DATUM -

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

S_ERZMIT -

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

S_ERZOHN -

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

EXPORTING Parameters details for CK_F_MAT_COST_SELECT

ANZA_KEKO -

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

TABLES Parameters details for CK_F_MAT_COST_SELECT

T_MATNR -

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

T_WERKS -

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

T_CLASS -

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

T_TYPE -

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

T_WRKTYP -

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

T_KLVAR -

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

T_TVERS -

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

T_FEHSTA -

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

T_KEKO -

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

EXCEPTIONS details

WRONG_CALL_PLAN_SONST -

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

WRONG_CALL_MIT_OHNE_ADD -

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

WRONG_CALL_DATUM -

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

NO_DATA_FOUND -

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

Copy and paste ABAP code example for CK_F_MAT_COST_SELECT 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_p_kokrs  TYPE KEKO-KOKRS, "   
lt_t_matnr  TYPE STANDARD TABLE OF KEKO, "   
lv_anza_keko  TYPE SY-TFILL, "   
lv_wrong_call_plan_sonst  TYPE SY, "   
lv_s_addmit  TYPE XFELD, "   
lv_s_extra  TYPE XFELD, "   
lv_s_mixohn  TYPE XFELD, "   
lv_p_amdat  TYPE CKI64A-AMDAT, "   
lt_t_werks  TYPE STANDARD TABLE OF CKI64A, "   
lv_wrong_call_mit_ohne_add  TYPE CKI64A, "   
lv_s_kalkz  TYPE XFELD, "   
lt_t_class  TYPE STANDARD TABLE OF XFELD, "   
lv_wrong_call_datum  TYPE XFELD, "   
lt_t_type  TYPE STANDARD TABLE OF XFELD, "   
lv_s_kalkl  TYPE XFELD, "   
lv_no_data_found  TYPE XFELD, "   
lv_s_kalkv  TYPE XFELD, "   
lt_t_wrktyp  TYPE STANDARD TABLE OF XFELD, "   
lv_s_sonst  TYPE XFELD, "   
lt_t_klvar  TYPE STANDARD TABLE OF XFELD, "   
lv_s_datum  TYPE XFELD, "   
lt_t_tvers  TYPE STANDARD TABLE OF XFELD, "   
lv_s_erzmit  TYPE XFELD, "   
lt_t_fehsta  TYPE STANDARD TABLE OF XFELD, "   
lt_t_keko  TYPE STANDARD TABLE OF KEKO, "   
lv_s_erzohn  TYPE XFELD. "   

  CALL FUNCTION 'CK_F_MAT_COST_SELECT'  "
    EXPORTING
         P_KOKRS = lv_p_kokrs
         S_ADDMIT = lv_s_addmit
         S_EXTRA = lv_s_extra
         S_MIXOHN = lv_s_mixohn
         P_AMDAT = lv_p_amdat
         S_KALKZ = lv_s_kalkz
         S_KALKL = lv_s_kalkl
         S_KALKV = lv_s_kalkv
         S_SONST = lv_s_sonst
         S_DATUM = lv_s_datum
         S_ERZMIT = lv_s_erzmit
         S_ERZOHN = lv_s_erzohn
    IMPORTING
         ANZA_KEKO = lv_anza_keko
    TABLES
         T_MATNR = lt_t_matnr
         T_WERKS = lt_t_werks
         T_CLASS = lt_t_class
         T_TYPE = lt_t_type
         T_WRKTYP = lt_t_wrktyp
         T_KLVAR = lt_t_kltar
         T_TVERS = lt_t_tvers
         T_FEHSTA = lt_t_fehsta
         T_KEKO = lt_t_keko
    EXCEPTIONS
        WRONG_CALL_PLAN_SONST = 1
        WRONG_CALL_MIT_OHNE_ADD = 2
        WRONG_CALL_DATUM = 3
        NO_DATA_FOUND = 4
. " CK_F_MAT_COST_SELECT




ABAP code using 7.40 inline data declarations to call FM CK_F_MAT_COST_SELECT

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 KEKO INTO @DATA(ld_p_kokrs).
 
 
"SELECT single TFILL FROM SY INTO @DATA(ld_anza_keko).
 
 
 
 
 
"SELECT single AMDAT FROM CKI64A INTO @DATA(ld_p_amdat).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!