SAP MLCCS_DYNAMICALLY_CREATE Function Module for
MLCCS_DYNAMICALLY_CREATE is a standard mlccs dynamically create 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 mlccs dynamically create FM, simply by entering the name MLCCS_DYNAMICALLY_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: MLCCS_MATERIAL_MASTER
Program Name: SAPLMLCCS_MATERIAL_MASTER
Main Program: SAPLMLCCS_MATERIAL_MASTER
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MLCCS_DYNAMICALLY_CREATE 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 'MLCCS_DYNAMICALLY_CREATE'".
EXPORTING
I_KALNR = "Cost Estimate Number for Cost Est. w/o Qty Structure
I_MATNR = "Material Number
I_BWKEY = "Valuation Area
I_MLAST = "Material Price Determination: Control
I_BKLAS = "Valuation Class
I_VMBKL = "Valuation Class in Previous Period
I_VJBKL = "Valuation Class in Previous Year
I_MTART = "Material Type
I_HRKFT = "Origin Group as Subdivision of Cost Element
IMPORTING
ET_CKMLPRKEKO = "Table Type CKMLPRKEKO (sorted)
ET_CKMLPRKEPH = "Table Type CKMLPRKEPH (sorted)
TABLES
IT_CKMLPR = "
IT_CKMLPP = "
IT_CKMLCR = "
IMPORTING Parameters details for MLCCS_DYNAMICALLY_CREATE
I_KALNR - Cost Estimate Number for Cost Est. w/o Qty Structure
Data type: CKMLHD-KALNROptional: No
Call by Reference: Yes
I_MATNR - Material Number
Data type: CKMLHD-MATNROptional: No
Call by Reference: Yes
I_BWKEY - Valuation Area
Data type: CKMLHD-BWKEYOptional: No
Call by Reference: Yes
I_MLAST - Material Price Determination: Control
Data type: MT08L-MLASTOptional: No
Call by Reference: Yes
I_BKLAS - Valuation Class
Data type: MT08L-BKLASOptional: No
Call by Reference: Yes
I_VMBKL - Valuation Class in Previous Period
Data type: MT08L-VMBKLOptional: No
Call by Reference: Yes
I_VJBKL - Valuation Class in Previous Year
Data type: MT08L-VJBKLOptional: No
Call by Reference: Yes
I_MTART - Material Type
Data type: MT08L-MTARTOptional: No
Call by Reference: Yes
I_HRKFT - Origin Group as Subdivision of Cost Element
Data type: MT08L-HRKFTOptional: No
Call by Reference: Yes
EXPORTING Parameters details for MLCCS_DYNAMICALLY_CREATE
ET_CKMLPRKEKO - Table Type CKMLPRKEKO (sorted)
Data type: MLCCS_T_PRKEKOOptional: No
Call by Reference: Yes
ET_CKMLPRKEPH - Table Type CKMLPRKEPH (sorted)
Data type: MLCCS_T_PRKEPHOptional: No
Call by Reference: Yes
TABLES Parameters details for MLCCS_DYNAMICALLY_CREATE
IT_CKMLPR -
Data type: CKMLPROptional: No
Call by Reference: No ( called with pass by value option)
IT_CKMLPP -
Data type: CKMLPPOptional: No
Call by Reference: No ( called with pass by value option)
IT_CKMLCR -
Data type: CKMLCROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MLCCS_DYNAMICALLY_CREATE 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_i_kalnr | TYPE CKMLHD-KALNR, " | |||
| lt_it_ckmlpr | TYPE STANDARD TABLE OF CKMLPR, " | |||
| lv_et_ckmlprkeko | TYPE MLCCS_T_PRKEKO, " | |||
| lv_i_matnr | TYPE CKMLHD-MATNR, " | |||
| lt_it_ckmlpp | TYPE STANDARD TABLE OF CKMLPP, " | |||
| lv_et_ckmlprkeph | TYPE MLCCS_T_PRKEPH, " | |||
| lv_i_bwkey | TYPE CKMLHD-BWKEY, " | |||
| lt_it_ckmlcr | TYPE STANDARD TABLE OF CKMLCR, " | |||
| lv_i_mlast | TYPE MT08L-MLAST, " | |||
| lv_i_bklas | TYPE MT08L-BKLAS, " | |||
| lv_i_vmbkl | TYPE MT08L-VMBKL, " | |||
| lv_i_vjbkl | TYPE MT08L-VJBKL, " | |||
| lv_i_mtart | TYPE MT08L-MTART, " | |||
| lv_i_hrkft | TYPE MT08L-HRKFT. " |
|   CALL FUNCTION 'MLCCS_DYNAMICALLY_CREATE' " |
| EXPORTING | ||
| I_KALNR | = lv_i_kalnr | |
| I_MATNR | = lv_i_matnr | |
| I_BWKEY | = lv_i_bwkey | |
| I_MLAST | = lv_i_mlast | |
| I_BKLAS | = lv_i_bklas | |
| I_VMBKL | = lv_i_vmbkl | |
| I_VJBKL | = lv_i_vjbkl | |
| I_MTART | = lv_i_mtart | |
| I_HRKFT | = lv_i_hrkft | |
| IMPORTING | ||
| ET_CKMLPRKEKO | = lv_et_ckmlprkeko | |
| ET_CKMLPRKEPH | = lv_et_ckmlprkeph | |
| TABLES | ||
| IT_CKMLPR | = lt_it_ckmlpr | |
| IT_CKMLPP | = lt_it_ckmlpp | |
| IT_CKMLCR | = lt_it_ckmlcr | |
| . " MLCCS_DYNAMICALLY_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM MLCCS_DYNAMICALLY_CREATE
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 KALNR FROM CKMLHD INTO @DATA(ld_i_kalnr). | ||||
| "SELECT single MATNR FROM CKMLHD INTO @DATA(ld_i_matnr). | ||||
| "SELECT single BWKEY FROM CKMLHD INTO @DATA(ld_i_bwkey). | ||||
| "SELECT single MLAST FROM MT08L INTO @DATA(ld_i_mlast). | ||||
| "SELECT single BKLAS FROM MT08L INTO @DATA(ld_i_bklas). | ||||
| "SELECT single VMBKL FROM MT08L INTO @DATA(ld_i_vmbkl). | ||||
| "SELECT single VJBKL FROM MT08L INTO @DATA(ld_i_vjbkl). | ||||
| "SELECT single MTART FROM MT08L INTO @DATA(ld_i_mtart). | ||||
| "SELECT single HRKFT FROM MT08L INTO @DATA(ld_i_hrkft). | ||||
Search for further information about these or an SAP related objects