SAP Function Modules

CP_BD_DIRECT_INPUT_PLAN_EXT SAP Function module







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

Associated Function Group: CPBD
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CP_BD_DIRECT_INPUT_PLAN_EXT - CP BD DIRECT INPUT PLAN EXT





CALL FUNCTION 'CP_BD_DIRECT_INPUT_PLAN_EXT' "
  EXPORTING
    rc271_ex_imp =              " rc271_ex      Group to process
*   rc27m_ex_imp = ''           " rc27m_ex
    save_di_imp =               " save_di       Flags
  IMPORTING
    error_di_exp =              " error_di      Error status record
    plnnr_exp =                 " plnnr         Group
  TABLES
    plko_di_ex_tab =            " plko_di_ex    Copy headers (ext. format)
    mapl_di_ex_tab =            " mapl_di_ex    Copy material allocation to task list (ext. format)
    plpo_di_ex_tab =            " plpo_di_ex    Copy operations (ext. format)
    plfl_di_ex_tab =            " plfl_di_ex    Copy sequences (ext. format)
    plmz_di_ex_tab =            " plmz_di_ex    Copy component allocation (ext. format)
    plfh_di_ex_tab =            " plfh_di_ex    Copy production resources/tools (ext. format)
    text_obj_di_ex_tab =        " txt_obj_ex    Copy text objects (ext. format)
    text_di_tab =               " tline         Copy text lines (ext. format)
    knowl_alloc_obj_di_ex_tab =   " rcuob1_ex
    knowl_alloc_di_ex_tab =     " rcuob2
*   knowl_basic_obj_di_ex_tab =   " rcukb1_ex
*   knowl_basic_di_ex_tab =     " rcukb2
*   knowl_names_obj_di_ex_tab =   " rcukbt1_ex
*   knowl_names_di_ex_tab =     " rcukbt2
*   knowl_docus_obj_di_ex_tab =   " rcukdo1_ex
*   knowl_docus_di_ex_tab =     " rcukdoc2
*   knowl_source_obj_di_ex_tab =   " rcukn1_ex
*   knowl_source_di_ex_tab =    " rcukn2
    obj_null_field_tab =        " obj_nfield    Fields not to be copied
    error_plan_di_tab =         " error_di      Table of error status records
    error_plan_tab =            " cmfmsg        Table of error messages
    .  "  CP_BD_DIRECT_INPUT_PLAN_EXT

ABAP code example for Function Module CP_BD_DIRECT_INPUT_PLAN_EXT





The ABAP code below is a full code listing to execute function module CP_BD_DIRECT_INPUT_PLAN_EXT 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_error_di_exp  TYPE ERROR_DI ,
ld_plnnr_exp  TYPE PLNNR ,
it_plko_di_ex_tab  TYPE STANDARD TABLE OF PLKO_DI_EX,"TABLES PARAM
wa_plko_di_ex_tab  LIKE LINE OF it_plko_di_ex_tab ,
it_mapl_di_ex_tab  TYPE STANDARD TABLE OF MAPL_DI_EX,"TABLES PARAM
wa_mapl_di_ex_tab  LIKE LINE OF it_mapl_di_ex_tab ,
it_plpo_di_ex_tab  TYPE STANDARD TABLE OF PLPO_DI_EX,"TABLES PARAM
wa_plpo_di_ex_tab  LIKE LINE OF it_plpo_di_ex_tab ,
it_plfl_di_ex_tab  TYPE STANDARD TABLE OF PLFL_DI_EX,"TABLES PARAM
wa_plfl_di_ex_tab  LIKE LINE OF it_plfl_di_ex_tab ,
it_plmz_di_ex_tab  TYPE STANDARD TABLE OF PLMZ_DI_EX,"TABLES PARAM
wa_plmz_di_ex_tab  LIKE LINE OF it_plmz_di_ex_tab ,
it_plfh_di_ex_tab  TYPE STANDARD TABLE OF PLFH_DI_EX,"TABLES PARAM
wa_plfh_di_ex_tab  LIKE LINE OF it_plfh_di_ex_tab ,
it_text_obj_di_ex_tab  TYPE STANDARD TABLE OF TXT_OBJ_EX,"TABLES PARAM
wa_text_obj_di_ex_tab  LIKE LINE OF it_text_obj_di_ex_tab ,
it_text_di_tab  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_text_di_tab  LIKE LINE OF it_text_di_tab ,
it_knowl_alloc_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUOB1_EX,"TABLES PARAM
wa_knowl_alloc_obj_di_ex_tab  LIKE LINE OF it_knowl_alloc_obj_di_ex_tab ,
it_knowl_alloc_di_ex_tab  TYPE STANDARD TABLE OF RCUOB2,"TABLES PARAM
wa_knowl_alloc_di_ex_tab  LIKE LINE OF it_knowl_alloc_di_ex_tab ,
it_knowl_basic_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKB1_EX,"TABLES PARAM
wa_knowl_basic_obj_di_ex_tab  LIKE LINE OF it_knowl_basic_obj_di_ex_tab ,
it_knowl_basic_di_ex_tab  TYPE STANDARD TABLE OF RCUKB2,"TABLES PARAM
wa_knowl_basic_di_ex_tab  LIKE LINE OF it_knowl_basic_di_ex_tab ,
it_knowl_names_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKBT1_EX,"TABLES PARAM
wa_knowl_names_obj_di_ex_tab  LIKE LINE OF it_knowl_names_obj_di_ex_tab ,
it_knowl_names_di_ex_tab  TYPE STANDARD TABLE OF RCUKBT2,"TABLES PARAM
wa_knowl_names_di_ex_tab  LIKE LINE OF it_knowl_names_di_ex_tab ,
it_knowl_docus_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKDO1_EX,"TABLES PARAM
wa_knowl_docus_obj_di_ex_tab  LIKE LINE OF it_knowl_docus_obj_di_ex_tab ,
it_knowl_docus_di_ex_tab  TYPE STANDARD TABLE OF RCUKDOC2,"TABLES PARAM
wa_knowl_docus_di_ex_tab  LIKE LINE OF it_knowl_docus_di_ex_tab ,
it_knowl_source_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKN1_EX,"TABLES PARAM
wa_knowl_source_obj_di_ex_tab  LIKE LINE OF it_knowl_source_obj_di_ex_tab ,
it_knowl_source_di_ex_tab  TYPE STANDARD TABLE OF RCUKN2,"TABLES PARAM
wa_knowl_source_di_ex_tab  LIKE LINE OF it_knowl_source_di_ex_tab ,
it_obj_null_field_tab  TYPE STANDARD TABLE OF OBJ_NFIELD,"TABLES PARAM
wa_obj_null_field_tab  LIKE LINE OF it_obj_null_field_tab ,
it_error_plan_di_tab  TYPE STANDARD TABLE OF ERROR_DI,"TABLES PARAM
wa_error_plan_di_tab  LIKE LINE OF it_error_plan_di_tab ,
it_error_plan_tab  TYPE STANDARD TABLE OF CMFMSG,"TABLES PARAM
wa_error_plan_tab  LIKE LINE OF it_error_plan_tab .

DATA(ld_rc271_ex_imp) = 'Check type of data required'.
DATA(ld_rc27m_ex_imp) = 'Check type of data required'.
DATA(ld_save_di_imp) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_plko_di_ex_tab to it_plko_di_ex_tab.

"populate fields of struture and append to itab
append wa_mapl_di_ex_tab to it_mapl_di_ex_tab.

"populate fields of struture and append to itab
append wa_plpo_di_ex_tab to it_plpo_di_ex_tab.

"populate fields of struture and append to itab
append wa_plfl_di_ex_tab to it_plfl_di_ex_tab.

"populate fields of struture and append to itab
append wa_plmz_di_ex_tab to it_plmz_di_ex_tab.

"populate fields of struture and append to itab
append wa_plfh_di_ex_tab to it_plfh_di_ex_tab.

"populate fields of struture and append to itab
append wa_text_obj_di_ex_tab to it_text_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_text_di_tab to it_text_di_tab.

"populate fields of struture and append to itab
append wa_knowl_alloc_obj_di_ex_tab to it_knowl_alloc_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_alloc_di_ex_tab to it_knowl_alloc_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_basic_obj_di_ex_tab to it_knowl_basic_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_basic_di_ex_tab to it_knowl_basic_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_names_obj_di_ex_tab to it_knowl_names_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_names_di_ex_tab to it_knowl_names_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_docus_obj_di_ex_tab to it_knowl_docus_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_docus_di_ex_tab to it_knowl_docus_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_source_obj_di_ex_tab to it_knowl_source_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_source_di_ex_tab to it_knowl_source_di_ex_tab.

"populate fields of struture and append to itab
append wa_obj_null_field_tab to it_obj_null_field_tab.

"populate fields of struture and append to itab
append wa_error_plan_di_tab to it_error_plan_di_tab.

"populate fields of struture and append to itab
append wa_error_plan_tab to it_error_plan_tab. . CALL FUNCTION 'CP_BD_DIRECT_INPUT_PLAN_EXT' EXPORTING rc271_ex_imp = ld_rc271_ex_imp * rc27m_ex_imp = ld_rc27m_ex_imp save_di_imp = ld_save_di_imp IMPORTING error_di_exp = ld_error_di_exp plnnr_exp = ld_plnnr_exp TABLES plko_di_ex_tab = it_plko_di_ex_tab mapl_di_ex_tab = it_mapl_di_ex_tab plpo_di_ex_tab = it_plpo_di_ex_tab plfl_di_ex_tab = it_plfl_di_ex_tab plmz_di_ex_tab = it_plmz_di_ex_tab plfh_di_ex_tab = it_plfh_di_ex_tab text_obj_di_ex_tab = it_text_obj_di_ex_tab text_di_tab = it_text_di_tab knowl_alloc_obj_di_ex_tab = it_knowl_alloc_obj_di_ex_tab knowl_alloc_di_ex_tab = it_knowl_alloc_di_ex_tab * knowl_basic_obj_di_ex_tab = it_knowl_basic_obj_di_ex_tab * knowl_basic_di_ex_tab = it_knowl_basic_di_ex_tab * knowl_names_obj_di_ex_tab = it_knowl_names_obj_di_ex_tab * knowl_names_di_ex_tab = it_knowl_names_di_ex_tab * knowl_docus_obj_di_ex_tab = it_knowl_docus_obj_di_ex_tab * knowl_docus_di_ex_tab = it_knowl_docus_di_ex_tab * knowl_source_obj_di_ex_tab = it_knowl_source_obj_di_ex_tab * knowl_source_di_ex_tab = it_knowl_source_di_ex_tab obj_null_field_tab = it_obj_null_field_tab error_plan_di_tab = it_error_plan_di_tab error_plan_tab = it_error_plan_tab . " CP_BD_DIRECT_INPUT_PLAN_EXT
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_error_di_exp  TYPE ERROR_DI ,
ld_rc271_ex_imp  TYPE RC271_EX ,
it_plko_di_ex_tab  TYPE STANDARD TABLE OF PLKO_DI_EX ,
wa_plko_di_ex_tab  LIKE LINE OF it_plko_di_ex_tab,
ld_plnnr_exp  TYPE PLNNR ,
ld_rc27m_ex_imp  TYPE RC27M_EX ,
it_mapl_di_ex_tab  TYPE STANDARD TABLE OF MAPL_DI_EX ,
wa_mapl_di_ex_tab  LIKE LINE OF it_mapl_di_ex_tab,
ld_save_di_imp  TYPE SAVE_DI ,
it_plpo_di_ex_tab  TYPE STANDARD TABLE OF PLPO_DI_EX ,
wa_plpo_di_ex_tab  LIKE LINE OF it_plpo_di_ex_tab,
it_plfl_di_ex_tab  TYPE STANDARD TABLE OF PLFL_DI_EX ,
wa_plfl_di_ex_tab  LIKE LINE OF it_plfl_di_ex_tab,
it_plmz_di_ex_tab  TYPE STANDARD TABLE OF PLMZ_DI_EX ,
wa_plmz_di_ex_tab  LIKE LINE OF it_plmz_di_ex_tab,
it_plfh_di_ex_tab  TYPE STANDARD TABLE OF PLFH_DI_EX ,
wa_plfh_di_ex_tab  LIKE LINE OF it_plfh_di_ex_tab,
it_text_obj_di_ex_tab  TYPE STANDARD TABLE OF TXT_OBJ_EX ,
wa_text_obj_di_ex_tab  LIKE LINE OF it_text_obj_di_ex_tab,
it_text_di_tab  TYPE STANDARD TABLE OF TLINE ,
wa_text_di_tab  LIKE LINE OF it_text_di_tab,
it_knowl_alloc_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUOB1_EX ,
wa_knowl_alloc_obj_di_ex_tab  LIKE LINE OF it_knowl_alloc_obj_di_ex_tab,
it_knowl_alloc_di_ex_tab  TYPE STANDARD TABLE OF RCUOB2 ,
wa_knowl_alloc_di_ex_tab  LIKE LINE OF it_knowl_alloc_di_ex_tab,
it_knowl_basic_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKB1_EX ,
wa_knowl_basic_obj_di_ex_tab  LIKE LINE OF it_knowl_basic_obj_di_ex_tab,
it_knowl_basic_di_ex_tab  TYPE STANDARD TABLE OF RCUKB2 ,
wa_knowl_basic_di_ex_tab  LIKE LINE OF it_knowl_basic_di_ex_tab,
it_knowl_names_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKBT1_EX ,
wa_knowl_names_obj_di_ex_tab  LIKE LINE OF it_knowl_names_obj_di_ex_tab,
it_knowl_names_di_ex_tab  TYPE STANDARD TABLE OF RCUKBT2 ,
wa_knowl_names_di_ex_tab  LIKE LINE OF it_knowl_names_di_ex_tab,
it_knowl_docus_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKDO1_EX ,
wa_knowl_docus_obj_di_ex_tab  LIKE LINE OF it_knowl_docus_obj_di_ex_tab,
it_knowl_docus_di_ex_tab  TYPE STANDARD TABLE OF RCUKDOC2 ,
wa_knowl_docus_di_ex_tab  LIKE LINE OF it_knowl_docus_di_ex_tab,
it_knowl_source_obj_di_ex_tab  TYPE STANDARD TABLE OF RCUKN1_EX ,
wa_knowl_source_obj_di_ex_tab  LIKE LINE OF it_knowl_source_obj_di_ex_tab,
it_knowl_source_di_ex_tab  TYPE STANDARD TABLE OF RCUKN2 ,
wa_knowl_source_di_ex_tab  LIKE LINE OF it_knowl_source_di_ex_tab,
it_obj_null_field_tab  TYPE STANDARD TABLE OF OBJ_NFIELD ,
wa_obj_null_field_tab  LIKE LINE OF it_obj_null_field_tab,
it_error_plan_di_tab  TYPE STANDARD TABLE OF ERROR_DI ,
wa_error_plan_di_tab  LIKE LINE OF it_error_plan_di_tab,
it_error_plan_tab  TYPE STANDARD TABLE OF CMFMSG ,
wa_error_plan_tab  LIKE LINE OF it_error_plan_tab.

ld_rc271_ex_imp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_plko_di_ex_tab to it_plko_di_ex_tab.
ld_rc27m_ex_imp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_mapl_di_ex_tab to it_mapl_di_ex_tab.
ld_save_di_imp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_plpo_di_ex_tab to it_plpo_di_ex_tab.

"populate fields of struture and append to itab
append wa_plfl_di_ex_tab to it_plfl_di_ex_tab.

"populate fields of struture and append to itab
append wa_plmz_di_ex_tab to it_plmz_di_ex_tab.

"populate fields of struture and append to itab
append wa_plfh_di_ex_tab to it_plfh_di_ex_tab.

"populate fields of struture and append to itab
append wa_text_obj_di_ex_tab to it_text_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_text_di_tab to it_text_di_tab.

"populate fields of struture and append to itab
append wa_knowl_alloc_obj_di_ex_tab to it_knowl_alloc_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_alloc_di_ex_tab to it_knowl_alloc_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_basic_obj_di_ex_tab to it_knowl_basic_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_basic_di_ex_tab to it_knowl_basic_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_names_obj_di_ex_tab to it_knowl_names_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_names_di_ex_tab to it_knowl_names_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_docus_obj_di_ex_tab to it_knowl_docus_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_docus_di_ex_tab to it_knowl_docus_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_source_obj_di_ex_tab to it_knowl_source_obj_di_ex_tab.

"populate fields of struture and append to itab
append wa_knowl_source_di_ex_tab to it_knowl_source_di_ex_tab.

"populate fields of struture and append to itab
append wa_obj_null_field_tab to it_obj_null_field_tab.

"populate fields of struture and append to itab
append wa_error_plan_di_tab to it_error_plan_di_tab.

"populate fields of struture and append to itab
append wa_error_plan_tab to it_error_plan_tab.

SAP Documentation for FM CP_BD_DIRECT_INPUT_PLAN_EXT


With the function module, routings can be directly saved in the routing database. This procedure considerably increases performance during data ...See here for full SAP fm documentation

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