SAP Function Modules

CP_CC_S_LOAD_BY_TSK SAP Function module







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

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


Pattern for FM CP_CC_S_LOAD_BY_TSK - CP CC S LOAD BY TSK





CALL FUNCTION 'CP_CC_S_LOAD_BY_TSK' "
  EXPORTING
    i_classes_in_workarea =     " classes_in_workarea
*   i_mat_ident =               " czcl_mat_tab_type
*   i_soi_ident =               " czcl_soi_tab_type
*   i_date_from = DATE-MIN_GRG  " sy-datum
*   i_date_to = DATE-MAX_GRG    " sy-datum
*   i_flg_tsk_set_lock = SPACE  " tsk_ctrl_data-flg_lock
*   i_flg_seq_set_lock = SPACE  " seq_ctrl_data-flg_lock
*   i_flg_opr_set_lock = SPACE  " opr_ctrl_data-flg_lock
*   i_flg_bom_set_lock = SPACE  " bom_ctrl_data-flg_lock
*   i_flg_itm_set_lock = SPACE  " itm_ctrl_data-flg_lock
*   i_message_handler = 'X'     " c
*   i_save_protocoll = SPACE    " c
  IMPORTING
    e_tsk_lock =                " cpcl_tsk_lock_tab_type
    e_seq_lock =                " cpcl_seq_lock_tab_type
    e_opr_lock =                " cpcl_opr_lock_tab_type
    e_bom_lock =                " cscl_bom_lock_tb_type
    e_itm_lock =                " cscl_itm_lock_tb_type
    e_workarea =                " t410
    e_profile =                 " tca41
    e_date_from =               " sy-datum
    e_date_to =                 " sy-datum
    e_flg_ecm_evaluation =      " c
  CHANGING
    c_tsk_ident =               " cpcl_tsk_tab_type
  EXCEPTIONS
    CLASS_IN_WORKAREA_INCONSISTENT = 1  "
    INVALID_SELECTION_PERIOD = 2  "
    KEY_DATE_REQUIRED_FOR_ECM = 3  "
    LOADING_NOT_ALLOWED = 4     "
    .  "  CP_CC_S_LOAD_BY_TSK

ABAP code example for Function Module CP_CC_S_LOAD_BY_TSK





The ABAP code below is a full code listing to execute function module CP_CC_S_LOAD_BY_TSK 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_tsk_lock  TYPE CPCL_TSK_LOCK_TAB_TYPE ,
ld_e_seq_lock  TYPE CPCL_SEQ_LOCK_TAB_TYPE ,
ld_e_opr_lock  TYPE CPCL_OPR_LOCK_TAB_TYPE ,
ld_e_bom_lock  TYPE CSCL_BOM_LOCK_TB_TYPE ,
ld_e_itm_lock  TYPE CSCL_ITM_LOCK_TB_TYPE ,
ld_e_workarea  TYPE T410 ,
ld_e_profile  TYPE TCA41 ,
ld_e_date_from  TYPE SY-DATUM ,
ld_e_date_to  TYPE SY-DATUM ,
ld_e_flg_ecm_evaluation  TYPE C .

DATA(ld_c_tsk_ident) = 'Check type of data required'.
DATA(ld_i_classes_in_workarea) = 'Check type of data required'.
DATA(ld_i_mat_ident) = 'Check type of data required'.
DATA(ld_i_soi_ident) = 'Check type of data required'.
DATA(ld_i_date_from) = '20210129'.
DATA(ld_i_date_to) = '20210129'.

DATA(ld_i_flg_tsk_set_lock) = some text here

DATA(ld_i_flg_seq_set_lock) = some text here

DATA(ld_i_flg_opr_set_lock) = some text here

DATA(ld_i_flg_bom_set_lock) = some text here

DATA(ld_i_flg_itm_set_lock) = some text here
DATA(ld_i_message_handler) = '20210129'.
DATA(ld_i_save_protocoll) = '20210129'. . CALL FUNCTION 'CP_CC_S_LOAD_BY_TSK' EXPORTING i_classes_in_workarea = ld_i_classes_in_workarea * i_mat_ident = ld_i_mat_ident * i_soi_ident = ld_i_soi_ident * i_date_from = ld_i_date_from * i_date_to = ld_i_date_to * i_flg_tsk_set_lock = ld_i_flg_tsk_set_lock * i_flg_seq_set_lock = ld_i_flg_seq_set_lock * i_flg_opr_set_lock = ld_i_flg_opr_set_lock * i_flg_bom_set_lock = ld_i_flg_bom_set_lock * i_flg_itm_set_lock = ld_i_flg_itm_set_lock * i_message_handler = ld_i_message_handler * i_save_protocoll = ld_i_save_protocoll IMPORTING e_tsk_lock = ld_e_tsk_lock e_seq_lock = ld_e_seq_lock e_opr_lock = ld_e_opr_lock e_bom_lock = ld_e_bom_lock e_itm_lock = ld_e_itm_lock e_workarea = ld_e_workarea e_profile = ld_e_profile e_date_from = ld_e_date_from e_date_to = ld_e_date_to e_flg_ecm_evaluation = ld_e_flg_ecm_evaluation CHANGING c_tsk_ident = ld_c_tsk_ident EXCEPTIONS CLASS_IN_WORKAREA_INCONSISTENT = 1 INVALID_SELECTION_PERIOD = 2 KEY_DATE_REQUIRED_FOR_ECM = 3 LOADING_NOT_ALLOWED = 4 . " CP_CC_S_LOAD_BY_TSK
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_c_tsk_ident  TYPE CPCL_TSK_TAB_TYPE ,
ld_e_tsk_lock  TYPE CPCL_TSK_LOCK_TAB_TYPE ,
ld_i_classes_in_workarea  TYPE CLASSES_IN_WORKAREA ,
ld_e_seq_lock  TYPE CPCL_SEQ_LOCK_TAB_TYPE ,
ld_i_mat_ident  TYPE CZCL_MAT_TAB_TYPE ,
ld_i_soi_ident  TYPE CZCL_SOI_TAB_TYPE ,
ld_e_opr_lock  TYPE CPCL_OPR_LOCK_TAB_TYPE ,
ld_i_date_from  TYPE SY-DATUM ,
ld_e_bom_lock  TYPE CSCL_BOM_LOCK_TB_TYPE ,
ld_i_date_to  TYPE SY-DATUM ,
ld_e_itm_lock  TYPE CSCL_ITM_LOCK_TB_TYPE ,
ld_e_workarea  TYPE T410 ,
ld_i_flg_tsk_set_lock  TYPE TSK_CTRL_DATA-FLG_LOCK ,
ld_e_profile  TYPE TCA41 ,
ld_i_flg_seq_set_lock  TYPE SEQ_CTRL_DATA-FLG_LOCK ,
ld_e_date_from  TYPE SY-DATUM ,
ld_i_flg_opr_set_lock  TYPE OPR_CTRL_DATA-FLG_LOCK ,
ld_e_date_to  TYPE SY-DATUM ,
ld_i_flg_bom_set_lock  TYPE BOM_CTRL_DATA-FLG_LOCK ,
ld_e_flg_ecm_evaluation  TYPE C ,
ld_i_flg_itm_set_lock  TYPE ITM_CTRL_DATA-FLG_LOCK ,
ld_i_message_handler  TYPE C ,
ld_i_save_protocoll  TYPE C .

ld_c_tsk_ident = '20210129'.
ld_i_classes_in_workarea = '20210129'.
ld_i_mat_ident = '20210129'.
ld_i_soi_ident = '20210129'.
ld_i_date_from = '20210129'.
ld_i_date_to = '20210129'.

ld_i_flg_tsk_set_lock = some text here

ld_i_flg_seq_set_lock = some text here

ld_i_flg_opr_set_lock = some text here

ld_i_flg_bom_set_lock = some text here

ld_i_flg_itm_set_lock = some text here
ld_i_message_handler = '20210129'.
ld_i_save_protocoll = '20210129'.

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