CSAP_MAT_BOM_MAINTAIN is a standard SAP function module that performs functionality. This is available within standard R/3 SAP systems depending on version and release level.
Below are the pattern details for this FM showing its interface including any import, export and tables parameters. There is also a list of Exceptions and for your convenience any standard documentation available. All this information and more can also be viewed if you enter the function module name CSAP_MAT_BOM_MAINTAIN into the relevant SAP transaction such as SE37 or SE80.
CALL FUNCTION 'CSAP_MAT_BOM_MAINTAIN' " EXPORTING material = " csap_mbom-matnr Material * plant = " csap_mbom-werks Plant bom_usage = " csap_mbom-stlan BOM usage * alternative = " csap_mbom-stlal Alternative BOM * valid_from = " csap_mbom-datuv Valid-from date * change_no = " csap_mbom-aennr Change number * revision_level = " csap_mbom-revlv Revision level i_stko = " stko_api01 BOM header data * fl_no_change_doc = SPACE " capiflag-no_chg_doc Do not write change documents * fl_bom_create = SPACE " csdata-xfeld Create BOM if it does not exist * fl_new_item = SPACE " csdata-xfeld Create item if it does not exist * fl_default_values = 'X' " csdata-xfeld Default Values for New Items IMPORTING fl_warning = " capiflag-flwarning Log contains warning messages o_stko = " stko_api02 BOM header data * TABLES * t_stpo = " stpo_api03 BOM items * t_dep_data = " csdep_dat Object dependencies: basic data * t_dep_descr = " csdep_desc Object dependencies: description * t_dep_order = " csdep_ord Object dependencies: sort sequence * t_dep_source = " csdep_sorc Object dependencies: source code * t_dep_doc = " csdep_doc Object dependencies: documentation * t_stpu = " stpu_api01 BOM sub-items EXCEPTIONS ERROR = 1 " Terminate processing . " CSAP_MAT_BOM_MAINTAIN
This function module is intended mainly as a tool for changing BOMs. However, it can also be used to create BOMs.
CSAP_MAT_BOM_OPEN CSAP_BOM_ITEM_MAINTAIN CSAP_MAT_BOM_CLOSEindividual function modules.
For more information and examples, see the documentation of the
The names of these identifying fields begin with 'ID_' and are contained in structure CSIDENT_02. Structure CSIDENT_02 is part ofstructure STPO_API03.
You can use any combination of these fields to identify the item, provided the fields identify the item uniquely. Otherwise you see theerror message 'Item cannot be identified uniquely'.
These fields are only known to the system if you have read the BOM before. If you identify the item in this way, you should therefore usefunction modules CSAP_MAT_BOM_OPEN, CSAP_BOM_ITEM_MAINTAIN, or CSAP_MAT_BOM_CLOSE to change the BOM.
- The item is not valid on the valid-from date - it becomes valid at a later date. - The item has already been changed on the same valid-from date with a different change number.
If you set this indicator to 'X', the system creates a new BOM if it cannot find the BOM you want to change and there is no other error.
Items can only be created if sufficient data exists to do this. The system ignores items with a deletion indicator when creating a BOM.
If you set this indicator to 'X', the system creates a new item if it cannot find the item with the identification entered.
The system ignores items with a deletion indicator.