SAP Function Modules

CP_CC_S_LOAD_COMPLEX_BY_BOM SAP Function module







CP_CC_S_LOAD_COMPLEX_BY_BOM 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_COMPLEX_BY_BOM 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_COMPLEX_BY_BOM - CP CC S LOAD COMPLEX BY BOM





CALL FUNCTION 'CP_CC_S_LOAD_COMPLEX_BY_BOM' "
  EXPORTING
    i_class =                   " t410-class
*   i_profile =                 " t410-profidnetz  Profile
*   i_work_area =               " t410-work_area  Working Environment
*   i_classes_in_workarea =     " classes_in_workarea
*   i_cpsc_mtk_sel =            " cpsc_mtk_sel_type  Material Selection Criteria
*   i_cpsc_com_sel =            " cpsc_com_sel_type
*   i_cpsc_tsk_sel =            " cpsc_tsk_sel_type
*   i_cpsc_opr_sel =            " cpsc_opr_sel_type
*   i_cpsc_suo_sel =            " cpsc_suo_sel_type
*   i_cpsc_mbm_sel =            " cpsc_mbm_sel_type
*   i_cpsc_bom_sel =            " cpsc_bom_sel_type
*   i_cpsc_itm_sel =            " cpsc_itm_sel_type
*   i_cpsc_sui_sel =            " cpsc_sui_sel_type
*   i_cpsc_prt_sel =            " cpsc_prt_sel_type
*   i_cpsc_pac_sel =            " cpsc_pac_sel_type
*   i_cpsc_cha_sel =            " cpsc_cha_sel_type
*   i_cpsc_mst_sel =            " cpsc_mst_sel_type
*   i_cpsc_odp_sel =            " cpsc_odp_sel_type
*   i_cpsc_cla_sel =            " cpsc_cla_sel_type  Classification Selection Criteria
*   i_cpsc_ecn_sel =            " cpsc_ecn_sel_type
*   i_sel_opr_ident =           " cpsc_sel_opr_tab_type
*   i_date_from = DATE-MIN_GRG  " sy-datum
*   i_date_to = DATE-MAX_GRG    " sy-datum
*   i_message_handler = 'X'     " c             Message Collector To Be Opened
*   i_save_protocoll = SPACE    " c
  IMPORTING
    e_bom_ident =               " cscl_bom_id_tb_type
    e_bom_lock =                " cscl_bom_lock_tb_type
    e_itm_lock =                " cscl_itm_lock_tb_type
    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_workarea =                " t410
    e_profile =                 " tca41
    e_date_from =               " sy-datum
    e_date_to =                 " sy-datum
    e_flg_ecm_evaluation =      "
  EXCEPTIONS
    WORKAREA_NOT_FOUND = 1      "
    CLASS_WRONG_TYPE = 2        "
    WORKAREA_WRONG_TYPE = 3     "
    CLASS_IN_WORKAREA_INCONSISTENT = 4  "
    WORKAREA_NOT_SPECIFIED = 5  "
    BOM_NOT_FOUND = 6           "
    NO_SELECTION_CRITERIA = 7   "
    INVALID_SELECTION_PERIOD = 8  "
    KEY_DATE_REQUIRED_FOR_ECM = 9  "
    .  "  CP_CC_S_LOAD_COMPLEX_BY_BOM

ABAP code example for Function Module CP_CC_S_LOAD_COMPLEX_BY_BOM





The ABAP code below is a full code listing to execute function module CP_CC_S_LOAD_COMPLEX_BY_BOM 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_bom_ident  TYPE CSCL_BOM_ID_TB_TYPE ,
ld_e_bom_lock  TYPE CSCL_BOM_LOCK_TB_TYPE ,
ld_e_itm_lock  TYPE CSCL_ITM_LOCK_TB_TYPE ,
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_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 STRING .


SELECT single CLASS
FROM T410
INTO @DATA(ld_i_class).


SELECT single PROFIDNETZ
FROM T410
INTO @DATA(ld_i_profile).


SELECT single WORK_AREA
FROM T410
INTO @DATA(ld_i_work_area).

DATA(ld_i_classes_in_workarea) = 'Check type of data required'.
DATA(ld_i_cpsc_mtk_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_com_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_tsk_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_opr_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_suo_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_mbm_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_bom_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_itm_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_sui_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_prt_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_pac_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_cha_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_mst_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_odp_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_cla_sel) = 'Check type of data required'.
DATA(ld_i_cpsc_ecn_sel) = 'Check type of data required'.
DATA(ld_i_sel_opr_ident) = 'Check type of data required'.
DATA(ld_i_date_from) = '20210129'.
DATA(ld_i_date_to) = '20210129'.
DATA(ld_i_message_handler) = '20210129'.
DATA(ld_i_save_protocoll) = '20210129'. . CALL FUNCTION 'CP_CC_S_LOAD_COMPLEX_BY_BOM' EXPORTING i_class = ld_i_class * i_profile = ld_i_profile * i_work_area = ld_i_work_area * i_classes_in_workarea = ld_i_classes_in_workarea * i_cpsc_mtk_sel = ld_i_cpsc_mtk_sel * i_cpsc_com_sel = ld_i_cpsc_com_sel * i_cpsc_tsk_sel = ld_i_cpsc_tsk_sel * i_cpsc_opr_sel = ld_i_cpsc_opr_sel * i_cpsc_suo_sel = ld_i_cpsc_suo_sel * i_cpsc_mbm_sel = ld_i_cpsc_mbm_sel * i_cpsc_bom_sel = ld_i_cpsc_bom_sel * i_cpsc_itm_sel = ld_i_cpsc_itm_sel * i_cpsc_sui_sel = ld_i_cpsc_sui_sel * i_cpsc_prt_sel = ld_i_cpsc_prt_sel * i_cpsc_pac_sel = ld_i_cpsc_pac_sel * i_cpsc_cha_sel = ld_i_cpsc_cha_sel * i_cpsc_mst_sel = ld_i_cpsc_mst_sel * i_cpsc_odp_sel = ld_i_cpsc_odp_sel * i_cpsc_cla_sel = ld_i_cpsc_cla_sel * i_cpsc_ecn_sel = ld_i_cpsc_ecn_sel * i_sel_opr_ident = ld_i_sel_opr_ident * i_date_from = ld_i_date_from * i_date_to = ld_i_date_to * i_message_handler = ld_i_message_handler * i_save_protocoll = ld_i_save_protocoll IMPORTING e_bom_ident = ld_e_bom_ident e_bom_lock = ld_e_bom_lock e_itm_lock = ld_e_itm_lock e_tsk_lock = ld_e_tsk_lock e_seq_lock = ld_e_seq_lock e_opr_lock = ld_e_opr_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 EXCEPTIONS WORKAREA_NOT_FOUND = 1 CLASS_WRONG_TYPE = 2 WORKAREA_WRONG_TYPE = 3 CLASS_IN_WORKAREA_INCONSISTENT = 4 WORKAREA_NOT_SPECIFIED = 5 BOM_NOT_FOUND = 6 NO_SELECTION_CRITERIA = 7 INVALID_SELECTION_PERIOD = 8 KEY_DATE_REQUIRED_FOR_ECM = 9 . " CP_CC_S_LOAD_COMPLEX_BY_BOM
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "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_bom_ident  TYPE CSCL_BOM_ID_TB_TYPE ,
ld_i_class  TYPE T410-CLASS ,
ld_e_bom_lock  TYPE CSCL_BOM_LOCK_TB_TYPE ,
ld_i_profile  TYPE T410-PROFIDNETZ ,
ld_e_itm_lock  TYPE CSCL_ITM_LOCK_TB_TYPE ,
ld_i_work_area  TYPE T410-WORK_AREA ,
ld_e_tsk_lock  TYPE CPCL_TSK_LOCK_TAB_TYPE ,
ld_i_classes_in_workarea  TYPE CLASSES_IN_WORKAREA ,
ld_i_cpsc_mtk_sel  TYPE CPSC_MTK_SEL_TYPE ,
ld_e_seq_lock  TYPE CPCL_SEQ_LOCK_TAB_TYPE ,
ld_i_cpsc_com_sel  TYPE CPSC_COM_SEL_TYPE ,
ld_e_opr_lock  TYPE CPCL_OPR_LOCK_TAB_TYPE ,
ld_i_cpsc_tsk_sel  TYPE CPSC_TSK_SEL_TYPE ,
ld_e_workarea  TYPE T410 ,
ld_i_cpsc_opr_sel  TYPE CPSC_OPR_SEL_TYPE ,
ld_e_profile  TYPE TCA41 ,
ld_i_cpsc_suo_sel  TYPE CPSC_SUO_SEL_TYPE ,
ld_e_date_from  TYPE SY-DATUM ,
ld_e_date_to  TYPE SY-DATUM ,
ld_i_cpsc_mbm_sel  TYPE CPSC_MBM_SEL_TYPE ,
ld_e_flg_ecm_evaluation  TYPE STRING ,
ld_i_cpsc_bom_sel  TYPE CPSC_BOM_SEL_TYPE ,
ld_i_cpsc_itm_sel  TYPE CPSC_ITM_SEL_TYPE ,
ld_i_cpsc_sui_sel  TYPE CPSC_SUI_SEL_TYPE ,
ld_i_cpsc_prt_sel  TYPE CPSC_PRT_SEL_TYPE ,
ld_i_cpsc_pac_sel  TYPE CPSC_PAC_SEL_TYPE ,
ld_i_cpsc_cha_sel  TYPE CPSC_CHA_SEL_TYPE ,
ld_i_cpsc_mst_sel  TYPE CPSC_MST_SEL_TYPE ,
ld_i_cpsc_odp_sel  TYPE CPSC_ODP_SEL_TYPE ,
ld_i_cpsc_cla_sel  TYPE CPSC_CLA_SEL_TYPE ,
ld_i_cpsc_ecn_sel  TYPE CPSC_ECN_SEL_TYPE ,
ld_i_sel_opr_ident  TYPE CPSC_SEL_OPR_TAB_TYPE ,
ld_i_date_from  TYPE SY-DATUM ,
ld_i_date_to  TYPE SY-DATUM ,
ld_i_message_handler  TYPE C ,
ld_i_save_protocoll  TYPE C .


SELECT single CLASS
FROM T410
INTO ld_i_class.


SELECT single PROFIDNETZ
FROM T410
INTO ld_i_profile.


SELECT single WORK_AREA
FROM T410
INTO ld_i_work_area.

ld_i_classes_in_workarea = '20210129'.
ld_i_cpsc_mtk_sel = '20210129'.
ld_i_cpsc_com_sel = '20210129'.
ld_i_cpsc_tsk_sel = '20210129'.
ld_i_cpsc_opr_sel = '20210129'.
ld_i_cpsc_suo_sel = '20210129'.
ld_i_cpsc_mbm_sel = '20210129'.
ld_i_cpsc_bom_sel = '20210129'.
ld_i_cpsc_itm_sel = '20210129'.
ld_i_cpsc_sui_sel = '20210129'.
ld_i_cpsc_prt_sel = '20210129'.
ld_i_cpsc_pac_sel = '20210129'.
ld_i_cpsc_cha_sel = '20210129'.
ld_i_cpsc_mst_sel = '20210129'.
ld_i_cpsc_odp_sel = '20210129'.
ld_i_cpsc_cla_sel = '20210129'.
ld_i_cpsc_ecn_sel = '20210129'.
ld_i_sel_opr_ident = '20210129'.
ld_i_date_from = '20210129'.
ld_i_date_to = '20210129'.
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_COMPLEX_BY_BOM or its description.