SAP Function Modules

CKMCD_MLCD_CREATE SAP Function module







CKMCD_MLCD_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CKMCD_MLCD_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CKMCD
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CKMCD_MLCD_CREATE - CKMCD MLCD CREATE





CALL FUNCTION 'CKMCD_MLCD_CREATE' "
* EXPORTING
*   i_not_mlast2 = SPACE        " boole-boole
*   i_not_mlast3 = SPACE        " boole-boole
*   i_only_kalnr =              " ckmlhd-kalnr
*   i_only_bdatj =              " ckmlpp-bdatj
*   i_only_poper =              " ckmlpp-poper
  IMPORTING
    et_ckmlkeph =               " mlccs_t_keph  Table Type CKMLKEPH (Sorted)
  TABLES
    it_mlhd =                   " mlhd
    it_mlit =                   " mlit
    it_mlpp =                   " mlpp
    it_mlppf =                  " mlppf
    it_mlcr =                   " mlcr
    it_mlcrf =                  " mlcrf
*   it_mlkeph =                 " mlkeph
*   et_mlcd =                   " mlcd
    .  "  CKMCD_MLCD_CREATE

ABAP code example for Function Module CKMCD_MLCD_CREATE





The ABAP code below is a full code listing to execute function module CKMCD_MLCD_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_et_ckmlkeph  TYPE MLCCS_T_KEPH ,
it_it_mlhd  TYPE STANDARD TABLE OF MLHD,"TABLES PARAM
wa_it_mlhd  LIKE LINE OF it_it_mlhd ,
it_it_mlit  TYPE STANDARD TABLE OF MLIT,"TABLES PARAM
wa_it_mlit  LIKE LINE OF it_it_mlit ,
it_it_mlpp  TYPE STANDARD TABLE OF MLPP,"TABLES PARAM
wa_it_mlpp  LIKE LINE OF it_it_mlpp ,
it_it_mlppf  TYPE STANDARD TABLE OF MLPPF,"TABLES PARAM
wa_it_mlppf  LIKE LINE OF it_it_mlppf ,
it_it_mlcr  TYPE STANDARD TABLE OF MLCR,"TABLES PARAM
wa_it_mlcr  LIKE LINE OF it_it_mlcr ,
it_it_mlcrf  TYPE STANDARD TABLE OF MLCRF,"TABLES PARAM
wa_it_mlcrf  LIKE LINE OF it_it_mlcrf ,
it_it_mlkeph  TYPE STANDARD TABLE OF MLKEPH,"TABLES PARAM
wa_it_mlkeph  LIKE LINE OF it_it_mlkeph ,
it_et_mlcd  TYPE STANDARD TABLE OF MLCD,"TABLES PARAM
wa_et_mlcd  LIKE LINE OF it_et_mlcd .


DATA(ld_i_not_mlast2) = some text here

DATA(ld_i_not_mlast3) = some text here

SELECT single KALNR
FROM CKMLHD
INTO @DATA(ld_i_only_kalnr).


SELECT single BDATJ
FROM CKMLPP
INTO @DATA(ld_i_only_bdatj).


SELECT single POPER
FROM CKMLPP
INTO @DATA(ld_i_only_poper).


"populate fields of struture and append to itab
append wa_it_mlhd to it_it_mlhd.

"populate fields of struture and append to itab
append wa_it_mlit to it_it_mlit.

"populate fields of struture and append to itab
append wa_it_mlpp to it_it_mlpp.

"populate fields of struture and append to itab
append wa_it_mlppf to it_it_mlppf.

"populate fields of struture and append to itab
append wa_it_mlcr to it_it_mlcr.

"populate fields of struture and append to itab
append wa_it_mlcrf to it_it_mlcrf.

"populate fields of struture and append to itab
append wa_it_mlkeph to it_it_mlkeph.

"populate fields of struture and append to itab
append wa_et_mlcd to it_et_mlcd. . CALL FUNCTION 'CKMCD_MLCD_CREATE' * EXPORTING * i_not_mlast2 = ld_i_not_mlast2 * i_not_mlast3 = ld_i_not_mlast3 * i_only_kalnr = ld_i_only_kalnr * i_only_bdatj = ld_i_only_bdatj * i_only_poper = ld_i_only_poper IMPORTING et_ckmlkeph = ld_et_ckmlkeph TABLES it_mlhd = it_it_mlhd it_mlit = it_it_mlit it_mlpp = it_it_mlpp it_mlppf = it_it_mlppf it_mlcr = it_it_mlcr it_mlcrf = it_it_mlcrf * it_mlkeph = it_it_mlkeph * et_mlcd = it_et_mlcd . " CKMCD_MLCD_CREATE
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_et_ckmlkeph  TYPE MLCCS_T_KEPH ,
ld_i_not_mlast2  TYPE BOOLE-BOOLE ,
it_it_mlhd  TYPE STANDARD TABLE OF MLHD ,
wa_it_mlhd  LIKE LINE OF it_it_mlhd,
ld_i_not_mlast3  TYPE BOOLE-BOOLE ,
it_it_mlit  TYPE STANDARD TABLE OF MLIT ,
wa_it_mlit  LIKE LINE OF it_it_mlit,
ld_i_only_kalnr  TYPE CKMLHD-KALNR ,
it_it_mlpp  TYPE STANDARD TABLE OF MLPP ,
wa_it_mlpp  LIKE LINE OF it_it_mlpp,
ld_i_only_bdatj  TYPE CKMLPP-BDATJ ,
it_it_mlppf  TYPE STANDARD TABLE OF MLPPF ,
wa_it_mlppf  LIKE LINE OF it_it_mlppf,
ld_i_only_poper  TYPE CKMLPP-POPER ,
it_it_mlcr  TYPE STANDARD TABLE OF MLCR ,
wa_it_mlcr  LIKE LINE OF it_it_mlcr,
it_it_mlcrf  TYPE STANDARD TABLE OF MLCRF ,
wa_it_mlcrf  LIKE LINE OF it_it_mlcrf,
it_it_mlkeph  TYPE STANDARD TABLE OF MLKEPH ,
wa_it_mlkeph  LIKE LINE OF it_it_mlkeph,
it_et_mlcd  TYPE STANDARD TABLE OF MLCD ,
wa_et_mlcd  LIKE LINE OF it_et_mlcd.


ld_i_not_mlast2 = some text here

"populate fields of struture and append to itab
append wa_it_mlhd to it_it_mlhd.

ld_i_not_mlast3 = some text here

"populate fields of struture and append to itab
append wa_it_mlit to it_it_mlit.

SELECT single KALNR
FROM CKMLHD
INTO ld_i_only_kalnr.


"populate fields of struture and append to itab
append wa_it_mlpp to it_it_mlpp.

SELECT single BDATJ
FROM CKMLPP
INTO ld_i_only_bdatj.


"populate fields of struture and append to itab
append wa_it_mlppf to it_it_mlppf.

SELECT single POPER
FROM CKMLPP
INTO ld_i_only_poper.


"populate fields of struture and append to itab
append wa_it_mlcr to it_it_mlcr.

"populate fields of struture and append to itab
append wa_it_mlcrf to it_it_mlcrf.

"populate fields of struture and append to itab
append wa_it_mlkeph to it_it_mlkeph.

"populate fields of struture and append to itab
append wa_et_mlcd to it_et_mlcd.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CKMCD_MLCD_CREATE or its description.