SAP Function Modules

CM_CL_P_COM_COPY_BY_OPR SAP Function module







CM_CL_P_COM_COPY_BY_OPR 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 CM_CL_P_COM_COPY_BY_OPR into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM CM_CL_P_COM_COPY_BY_OPR - CM CL P COM COPY BY OPR





CALL FUNCTION 'CM_CL_P_COM_COPY_BY_OPR' "
  EXPORTING
*   i_ecn_source = SPACE        " com_class_data-aennr  Change Number
*   i_key_date_source =         " com_class_data-datuv  Valid-From Date
*   i_ecn_s = SPACE             " com_class_data-aennr
    i_key_date_s =              " com_class_data-datuv
    i_plnty_target =            " com_class_data-plnty
    i_plnnr_target =            " com_class_data-plnnr
    i_plnal_target =            " com_class_data-plnal
    i_plnfl_target =            " com_class_data-plnfl
    i_plnkn_target =            " com_class_data-plnkn
    i_plnty_source =            " com_class_data-plnty
    i_plnnr_source =            " com_class_data-plnnr
    i_plnal_source =            " com_class_data-plnal
    i_plnfl_source =            " com_class_data-plnfl
    i_plnkn_source =            " com_class_data-plnkn
    i_stlty_root =              " com_class_data-stlty_w
    i_stlnr_root =              " com_class_data-stlnr_w
    i_stlal_root =              " com_class_data-stlal_w
*   i_itm_ident_mapping =       " cscl_itm_mapping_id_xt_tb_type
  IMPORTING
    e_ecm_data_error_type =     " cpcc_message_type
  EXCEPTIONS
    PATH_SOURCE_INCOMPLETE = 1  "
    PATH_TARGET_INCOMPLETE = 2  "
    ITM_ROOT_IS_MISSING = 3     "
    ECM_EVALUATION_NECESSARY = 4  "
    .  "  CM_CL_P_COM_COPY_BY_OPR

ABAP code example for Function Module CM_CL_P_COM_COPY_BY_OPR





The ABAP code below is a full code listing to execute function module CM_CL_P_COM_COPY_BY_OPR 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_e_ecm_data_error_type  TYPE CPCC_MESSAGE_TYPE .


DATA(ld_i_ecn_source) = some text here

DATA(ld_i_key_date_source) = 20210129

DATA(ld_i_ecn_s) = some text here

DATA(ld_i_key_date_s) = 20210129

DATA(ld_i_plnty_target) = some text here

DATA(ld_i_plnnr_target) = some text here

DATA(ld_i_plnal_target) = some text here

DATA(ld_i_plnfl_target) = some text here

DATA(ld_i_plnkn_target) = Check type of data required

DATA(ld_i_plnty_source) = some text here

DATA(ld_i_plnnr_source) = some text here

DATA(ld_i_plnal_source) = some text here

DATA(ld_i_plnfl_source) = some text here

DATA(ld_i_plnkn_source) = Check type of data required

DATA(ld_i_stlty_root) = some text here

DATA(ld_i_stlnr_root) = some text here

DATA(ld_i_stlal_root) = some text here
DATA(ld_i_itm_ident_mapping) = 'Check type of data required'. . CALL FUNCTION 'CM_CL_P_COM_COPY_BY_OPR' EXPORTING * i_ecn_source = ld_i_ecn_source * i_key_date_source = ld_i_key_date_source * i_ecn_s = ld_i_ecn_s i_key_date_s = ld_i_key_date_s i_plnty_target = ld_i_plnty_target i_plnnr_target = ld_i_plnnr_target i_plnal_target = ld_i_plnal_target i_plnfl_target = ld_i_plnfl_target i_plnkn_target = ld_i_plnkn_target i_plnty_source = ld_i_plnty_source i_plnnr_source = ld_i_plnnr_source i_plnal_source = ld_i_plnal_source i_plnfl_source = ld_i_plnfl_source i_plnkn_source = ld_i_plnkn_source i_stlty_root = ld_i_stlty_root i_stlnr_root = ld_i_stlnr_root i_stlal_root = ld_i_stlal_root * i_itm_ident_mapping = ld_i_itm_ident_mapping IMPORTING e_ecm_data_error_type = ld_e_ecm_data_error_type EXCEPTIONS PATH_SOURCE_INCOMPLETE = 1 PATH_TARGET_INCOMPLETE = 2 ITM_ROOT_IS_MISSING = 3 ECM_EVALUATION_NECESSARY = 4 . " CM_CL_P_COM_COPY_BY_OPR
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here 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_e_ecm_data_error_type  TYPE CPCC_MESSAGE_TYPE ,
ld_i_ecn_source  TYPE COM_CLASS_DATA-AENNR ,
ld_i_key_date_source  TYPE COM_CLASS_DATA-DATUV ,
ld_i_ecn_s  TYPE COM_CLASS_DATA-AENNR ,
ld_i_key_date_s  TYPE COM_CLASS_DATA-DATUV ,
ld_i_plnty_target  TYPE COM_CLASS_DATA-PLNTY ,
ld_i_plnnr_target  TYPE COM_CLASS_DATA-PLNNR ,
ld_i_plnal_target  TYPE COM_CLASS_DATA-PLNAL ,
ld_i_plnfl_target  TYPE COM_CLASS_DATA-PLNFL ,
ld_i_plnkn_target  TYPE COM_CLASS_DATA-PLNKN ,
ld_i_plnty_source  TYPE COM_CLASS_DATA-PLNTY ,
ld_i_plnnr_source  TYPE COM_CLASS_DATA-PLNNR ,
ld_i_plnal_source  TYPE COM_CLASS_DATA-PLNAL ,
ld_i_plnfl_source  TYPE COM_CLASS_DATA-PLNFL ,
ld_i_plnkn_source  TYPE COM_CLASS_DATA-PLNKN ,
ld_i_stlty_root  TYPE COM_CLASS_DATA-STLTY_W ,
ld_i_stlnr_root  TYPE COM_CLASS_DATA-STLNR_W ,
ld_i_stlal_root  TYPE COM_CLASS_DATA-STLAL_W ,
ld_i_itm_ident_mapping  TYPE CSCL_ITM_MAPPING_ID_XT_TB_TYPE .


ld_i_ecn_source = some text here

ld_i_key_date_source = 20210129

ld_i_ecn_s = some text here

ld_i_key_date_s = 20210129

ld_i_plnty_target = some text here

ld_i_plnnr_target = some text here

ld_i_plnal_target = some text here

ld_i_plnfl_target = some text here

ld_i_plnkn_target = Check type of data required

ld_i_plnty_source = some text here

ld_i_plnnr_source = some text here

ld_i_plnal_source = some text here

ld_i_plnfl_source = some text here

ld_i_plnkn_source = Check type of data required

ld_i_stlty_root = some text here

ld_i_stlnr_root = some text here

ld_i_stlal_root = some text here
ld_i_itm_ident_mapping = 'Check type of data required'.

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 CM_CL_P_COM_COPY_BY_OPR or its description.