PP Function module RFC Used the same way in S/4HANA

CSAP_MAT_BOM_MAINTAIN Maintain Material BOM

Changes an existing material BOM and can also create it or add new items through the FL_BOM_CREATE and FL_NEW_ITEM flags, like CS02. It is used in engineering change interfaces and in mass BOM correction programs. Work with a change number when history is required, and test the item flags (FL_NEW_ITEM, FL_COMPLETE) in a test system before mass changes.

Function group
CSAP
Remote-enabled (RFC)
Yes
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
MATERIALCSAP_MBOM-MATNRMaterial numberYes
PLANTCSAP_MBOM-WERKSPlant—
BOM_USAGECSAP_MBOM-STLANBOM usageYes
ALTERNATIVECSAP_MBOM-STLALAlternative BOM—
VALID_FROMCSAP_MBOM-DATUVValid-from date—
CHANGE_NOCSAP_MBOM-AENNRChange number—
I_STKOSTKO_API01BOM header dataYes
FL_BOM_CREATECSDATA-XFELDCreate BOM if it does not exist—
FL_NEW_ITEMCSDATA-XFELDCreate item if it does not exist—
FL_COMPLETECSDATA-XFELDItem list is complete—
FL_COMMIT_AND_WAITCAPIFLAG-COMM_WAITCommit and wait for update—

Exporting parameters

ParameterTypeDescription
FL_WARNINGCAPIFLAG-FLWARNINGLog contains warnings
O_STKOSTKO_API02BOM header after the change

Tables parameters

ParameterTypeDescriptionRequired
T_STPOSTPO_API03BOM items—
T_STPUSTPU_API01BOM sub-items—
T_LTX_LINECSLTX_LINEBOM long texts—

Exceptions

  • ERROR — Error occurred (see log)

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'CSAP_MAT_BOM_MAINTAIN'
  EXPORTING
    material = lv_material
    bom_usage = lv_bom_usage
    i_stko = lv_i_stko
  IMPORTING
    fl_warning = lv_fl_warning
    o_stko = lv_o_stko
  TABLES
    t_stpo = lt_t_stpo
    t_stpu = lt_t_stpu
    t_ltx_line = lt_t_ltx_line
  EXCEPTIONS
    error = 1
    OTHERS = 2.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report