Ansicht
Dokumentation

/SAPMP/BAPI_MAT_BOM_GR_CREATE - Mill Products: Create a Material BOM Group

/SAPMP/BAPI_MAT_BOM_GR_CREATE - Mill Products: Create a Material BOM Group

CL_GUI_FRONTEND_SERVICES - Frontend Services   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This method is used to create a bill of material (BOM) and all of the objects assigned to it.

If absolutely necessary, the entire bill of material can be copied, in other words,

  • All variants in a variant BOM or alternatives in a multiple BOM

  • The entire history

  • All material assignments

  • All items

  • All subitems

This allows initial data to be transferred from external systems in a single step.

Caution:

  • Please bear in mind that a bill of material can only be copied once. This means that you cannot copy different parts of the BOM group at different times. For example, you cannot copy part of the variants or items (especially those related to the history) and then copy the rest (such as other variants, other assignments, other historical states) at a later date.
  • Before you can copy a BOM successfully, all business objects that refer to a BOM must have been transferred to an SAP system. These objects are:
  • Material masters

  • Document info records, if there are document items in the BOM

  • Classes, if you want to copy class items

  • Change numbers that monitor the change state of the BOMs

  • Standard texts, if you want to integrate these in the long texts of the BOM group, variants or items

Example

You want to copy several (complete) BOM groups and their entire history.

  • This includes their variants (in the case of variant BOMs) or their alternatives (in the case of multiple BOMs) together with their history and assigned long texts.
  • The assignments of the assembly materials perhaps from different plants to the BOMs.
  • The relevant items and their historical states and long texts.
  • The subitems for these items.

To do so, you make entries in the following table, which are divided into three categories.

  • Tables that define objects
  • BOMGROUP,,,,,,-,,,,Basic data for whole BOM group

  • VARIANTS,,,,,,,,-,,,,Variants or alternative data

  • ITEMS,,,,,,,,-,,,,Items

  • SUBITEMS,,,,,,,,-,,,,Subitems

  • Tables that define dependencies between objects
  • MATERIALRELATIONS,,,,-,,Assignment of header materials to the BOM group with the relevant conditions

  • ITEMASSIGNMENTS,,,,-,,Conditions for assignments of components to variants or alternatives

  • SUBITEMASSIGNMENTS,,,,-,,Assignments of subitems to items

  • Table with other assigned attributes
  • TEXTS,,,,-,,Long texts for the different objects

In the transfer, the BOM groups are grouped together and given a unique group definition of up to 32 characters (BOM_GROUP_IDENTIFICATION). You enter this in all table entries. You can use this group definition to identify any external (unique) BOM groups that you store in the SAP system.

You identify each object in a BOM group uniquely in the OBJECT_ID field. To enable easy identification of the objects in the import data flow, the following values are also entered in the OBJECT_TYPE field:

  • BOM,,,,in the VARIANTS table

  • BGR,,,,in the BOMGROUP table

  • ITM,,,,in the ITEMS table

  • SUI,,,,in the SUBITEMS table.

In addition to this general data, the various tables also contain the following:

BOMGROUP

This table contains the basic characteristics of a BOM group, such as

  • BOM usage (BOM_USAGE)

  • Authorization group (AUTH_GROUP)

  • Description text (BOM_TEXT)


VARIANTS

This table contains the variant-specific data, such as

  • Laboratory (LAB_DESIGN)

  • Base quantity in which the component quantities are given (BASE_QTY)

  • Validity data, such as the change number (CHANGE_NO) or the valid from date (VALID_FROM_DATE)

In the FUNCTION field, you store the value

  • NEW,,,,If the variant validity begins on the specified valid from date

  • DEL ,,,,if the variant validity ends on the specified valid from date

ITEMS

This table contains the component attributes. Concurrent attributes that refer to primary objects, such as component material (COMPONENT), document number (DOCUMENT_NUMBER) and class number (CLASS_NUM) are defined using the item type (ITEM_CAT). See SAP Customizing for more information about the relevantitem types and other attributes that are dependent on the specified primary object.

SUBITEMS

This table contains data about the subitems, such as

  • Quantity (SUBITEM_QTY)

  • Installation point (INSTALLATION_POINT)

MATERIALRELATIONS

When you enter the BOM variant number, this table displays the assignments of assembly group materials to the BOM with the conditions

  • Plant

  • Lot size range with multiple BOMs (LOT_SIZE_FROM, LOT_SIZE_TO)

ITEMASSIGNMENTS

This table assigns the components to the different variants/alternatives or BOM group.

You enter the BOM component using the SUB_OBJECT_TYPE and SUB_OBJECT_ID fields and the variant/alternative using the SUPER_OBJECT_TYPE and SUPER_OBJECT_ID fields. In other words, you store the values from the OBJECT_TYPE and OBJECT_ID fields that appear in the ITEMS table in the SUB_OBJECT_TYPE and SUB_OBJECT_ID fields and the values from the OBJECT_TYPE and OBJECT_ID fields that appear in the VARIANTS table in the SUPER_OBJECT_TYPE, SUPER_OBJECT_ID fields.

The validity period for the assignment is defined using the valid from date (VALID_FROM_DATE) or change number (CHANGE_NO).

You must enter either of the following values in the FUNCTION field

  • NEW,,,,Component validity begins on this date

  • DEL,,,,Component validity ends on this date

SUBITEMASSIGNMENTS

This table assigns the subitems to the components.

Enter the subitems using the SUB_OBJECT_TYPE and SUB_OBJECT_ID fields and the component using the SUPER_OBJECT_TYPE and SUPER_OBJECT_ID fields. In other words, store the values from the OBJECT_TYPE and OBJECT_ID fields that appear in the SUBIITEMS table in the SUB_OBJECT_TYPE and SUB_OBJECT_ID fields and the values from the OBJECT_TYPE and OBJECT_ID fields that appear in the ITEMS table in the SUPER_OBJECT_TYPE and SUPER_OBJECT_ID fields.

TEXTS

The TEXTS table contains the various long texts for all objects to which long text can be assigned. The assignment to the relevant objects is assigned using the OBJECT_TYP and OBJECT_ID fields.


Notes

To update the data to the database, you have to execute a COMMIT WORK after each BOM group.

Any errors that occur are logged in the RETURN export parameter. If any inconsistencies arise, the entire BOM group is discarded.

Two types of message are issued in the RETURN export parameter:

  • Messages with the message ID BAPI provide information about the general result of input processing.
  • 000,,Processing was successful

  • 001,,Processing failed

  • Messages with the message ID BAPI1080 provide detailed information about processing.

There are also two types of detail message:

  • Message 028 indicates errors or warnings that result from the analysis of the structure of the BOM data. If only warning messages are issued, processing continues and is concluded successfully if no other errors occur. However, you should take heed of the warning.
  • Message 029 indicates errors in the data for the objects that have been imported (such as variants and items). In this case, processing is terminated.

In addition to messages 028 and 029, the system issues additional (error) messages that give a more detailed description of the particular subobjects (for example, variants or items) or their mutual dependencies. You identify the objects using the BOM_GROUP_IDENTIFICATION message variables and you identify the objects (for example, variants or items) in a group using OBJECT_TYP and OBJECT_ID.

The system also issues the application log (if one exists) or the internal message that was set in the APIs in the RETURN export parameter.

&FURTHER INFORMATION&





Parameters

ALL_ERROR
BOMGROUP
ITEMASSIGNMENTS
ITEMS
LENGTHCALCULATION
MATERIALRELATIONS
RETURN
SUBITEMASSIGNMENTS
SUBITEMS
TESTRUN
TEXTS
VARIANTS

Exceptions

Function Group

MP/SAPLCPCC_BUS1080

Fill RESBD Structure from EBP Component Structure   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 12707 Date: 20240328 Time: 094632     sap01-206 ( 147 ms )