This method enables you to create a material BOM with all its assignedobjects. In extreme case, the entire BOM group can be transferred, that means All variants of a variant BOM or alternatives of a multiple BOM The entire history All material assignments All items All subitems This enables the the data to be transferred from the non-SAP system inone step. Caution:>
- Make sure that a BOM can not be transferred several times. That
also means that you can not first transfer a part of the BOM group,such as part of the variants or items (particularly with regard tohistory) and then in a second run, transfer the rest (additionalvariants, assignments, other historical statuses and so on).>
- A prerequisite for the successful transfer of a BOM, is that all
business objects, to which a BOM refer have first been transferred intothe SAP System. These are> Material masters> Document info records, provided document items exist in the BOM > Classes, provided class items are to be transferred> Change numbers tha control the change status of the BOMs > Standard texts, provided they are to be included in the long textof the BOM group, variants or items > You want to transfer several (entire) BOM groups with complete history.
- In other words, the variants (in the case of variant BOMs) or
alternatives (in the case of multiple BOMs) with their history andassigned long texts.
- The assignment of assembly materials - possibly from different plants -
to BOMs.
- The corresponding items with their historical statuses and their long
texts.
- The sub items of these items
For this you generate entries in the following tables, which areorganized into three categories.
- Tables that define objects
BOMGROUP,,,,,,-,,,,Basic data for the entire BOM group VARIANTS,,,,,,,,-,,,,Variant or alternative data ITEMS,,,,,,,,-,,,,Items SUBITEMS,,,,,,,,-,,,,Subitems
- Tables that define the relationship between objects
MATERIALRELATIONS,,,,-,,Assignment of the header materials to the BOMgroups, with the relevant requirements ITEMASSIGNMENTS,,,,-,,Assignment requirements of the components to thevariants or alternatives SUBITEMASSIGNMENTS,,,,-,,Assignments of subitems to items
- Tables with other assigned attributes
TEXTS,,,,-,,Long texts for individual objects The BOM groups are cumulated within the running transfer with a uniquegroup definition of up to 32 characters (BOM_GROUP_IDENTIFICATION).This is entered in all table entries. Provided an external (unique) BOMgroup is to be placed in the SAP System, this can be used foridentification. Each object can be uniquely identified within a BOM group in the fieldOBJECT_ID. In order to be able to easily recognize the object in thedata stream of the import, the field OBJECT_TYPE is also filled withthe value: BOM,,,,in the table VARIANTS BGR,,,,in the table BOMGROUP ITM,,,,in the table ITEMS SUI,,,,in the table SUBITEMS In addition to this general data, the tables are individually createdas follows BOMGROUP> Contains the essential basic characteristics of a BOM group such as BOM usage (BOM_USAGE) Authorization group (AUTH_GROUP) Description (BOM_TEXT) and so on. VARIANTS > Contain the variant specific data such as Laboratory (LAB_DESIGN) Base quantity to which the component quantities refer (BASE_QTY) Validity entries such as change number (CHANGE_NO) and/or key date(VALID_FROM_DATE) In the field FUNCTION you place the value NEW,,,,if the variant runs in on a specified key date DEL ,,,,if the variant runs out on a specified key date ITEMS > Contains the component attributes. Competing attributes that refer toprimary objects, such as component material (COMPONENT), documentnumber (DOCUMENT_NUMBER), class number (CLASS_NUM) are determined bythe item category (ITEM_CAT). Read the information in SAP Customizingabout the relevant item types and about the other attributes related tothe specified primary objects. SUBITEMS > Contains the sub item data Quantity (SUBITEM_QTY) Installation location (INSTALLATION_POINT) and so on. MATERIAL RELATIONS> Contains - by entering the variant BOM number - the assignments of theassembly materials to the BOM with the requirements Plant Lot size area for multiple BOMs (LOT_SIZE_FROM, LOT_SIZE_TO) ITEMASSIGNMENTS> Assigns the components of the individual variants/alternatives to BOMgroups. In the fields SUB_OBJECT_TYPE, SUB_OBJECT_ID you enter the BOMcomponents and in the fields SUPER_OBJECT_TYPE, SUPER_OBJECT_ID youenter the variants/alternatives. This means, you deposit the valuesfrom the fields OBJECT_TYPE and OBJECT_ID from the table ITEMS in thefield SUB_OBJECT_TYPE, SUB_OBJECT_ID and the values from the fieldsOBJECT_TYPE and OBJECT_ID from the table VARIANTS in the fieldsSUPER_OBJECT_TYPE, SUPER_OBJECT_ID . The validity of the assignments is determined by the valid-from date(VALID_FROM_DATE) or change number (CHANGE_NO) The field FUNCTION has to be scheduled with a value NEW,,,,component created with this validity DEL,,,,component deleted with this validity. SUBITEM ASSIGNMENTS > Assigns the sub items to the components You enter the subitem in the fields SUB_OBJECT_TYPE, SUB_OBJECT_ID thecomponents in the fields SUPER_OBJECT_TYPE, SUPER_OBJECT_ID. Thatmeans, you deposit the values from the fields OBJECT_TYPE and OBJECT_IDof table SUBITEMS into the fields SUB_OBJECT_TYPE, SUB_OBJECT_ID andthe values from the fields OBJECT_TYPE and OBJECT_ID from table ITEMSinto the fields SUPER_OBJECT_TYPE, SUPER_OBJECT_ID . TEXTS > The table TEXTS contains the individual long text lines for all theobjects whose long texts can be assigned. The assignment to therelevant objects is produced in the fields OBJECT_TYP and OBJECT_ID.Notes To secure the data in the database, you have to carry out a COMMIT WORKfor each BOM group. All errors that occur are logged in the export parameter RETURN. In thecase of inconsistencies, the entire BOM group to be generated isrejected. The messages specified in the export parameter RETURN, are arranged asfollows:
- Messages with the message Id BAPI provide information about the general
results when processing the input. 000,,Processing was successful 001,,Processing failed
- Messages with the message Id BAPI1080 provide detailed information
about the processing. The detail messages fall into two groups:
- Message 028> highlights errors or warnings that result from the
analysis of the structure of the transferred BOM data. In the case thatonly warnings are given then the processing has been continued andfinished successfully provided no other error messages occur. Still, inthis case, the warning should be followed.
- Message 029> highlights errors in the data of the individual
imported objects (variants, items and so on). The process is cancelled>. In addition to messages 028 and 029, other (error) messages are given,which better describe the affected sub-objects (variants, items and soon) or their relationship with each other. The identification of theobject takes place using the message variable BOM_GROUP_IDENTIFICATIONto identify the addected BOM group, and OBJECT_TYP and OBJECT_ID toidentify the objects (variants, items and so on) within a group. Also (if available) the application log and/or the relevant internalmessage last set in the API are given in the export parameter RETURN.Description With the help of this parameter, you can determine whether thetransferred data is only checked for inconsistencies or whether it iswritten in the database. However, a write to the database will onlytake place provided no inconsistencies occur. Make sure, that when purely checking data, a new BOM number is assignedfrom the internal number range. Afterwards, this is no longer availablefor the creation of a new BOM. Value range Valid values are: ' ' (BLANK),, check and flag for update, provided there are noinconsistencies 'X',,only check Default The default value is BLANK, that means provided no inconsistenciesoccur the data is flagged for database insert. Description In this structure, the basic data of a BOM group is transferred intothe SAP System. In addition, the following attributes have to be> valuated, toensure the identification of the entire BOM group in the imported datastream and the identification of individual data objects within thegroup (BOM groups, (BOMGROUP), variants/alternatives (VARIANTS), items(ITEMS), subitems(SUBITEMS)). BOM_GROUP_IDENTIFICATION ,,,,-,,maximum 32 characters unique groupidentification OBJECT_TYPE,,,,- ,,fixed value 'BGR' OBJECT_ID,,,,- ,,unique maximum 32 character object identification Information about the meaning of the remaining parameter fields can befound in the relevant data element documentation in the ABAPdictionary. The structure contains the assignments of items to the variants/alternatives. For this, the following attributes have to be valuated: SUB_OBJECT_TYPE,,-,,fixed value 'ITM' SUB_OBJECT_ID,,-,,unique identification maximum 32 characters of itemwithin the group SUPER_OBJECT_TYPE,,-,,fixed value 'BOM' SUPER_OBJECT_ID,,-,,unique identification maximum 32 characters ofvariants/alternatives within a group One of the attributes VALID_FROM_DATE or CHANGE_NO has to be enteredso that the effectivity of the assignment can be determined. It is esssential to enter one of the following values in the fieldFUNCTION : NEW,,-,,If the assignment of the item to variants/alternatives iscreated (on specified key date/change status) DEL,,-,,If the assignment of the item to variants/alternatives iscompleted (on specified key date/change status) In this structure, item data is transferred. In order to assign BOM group items, the field BOM_GROUP_IDENTIFICATIONhas to have the values in the BOMGROUP structure. In addition, the following attributes have to be valuated in order toensure the identification of the items in the group. OBJECT_TYPE,,,,,,- ,,fixed value 'ITM' OBJECT_ID,,,,,,- ,,unique identification maximum 32 characters withinthe group It is essential to enter one of the following values in the fieldFUNCTION: NEW ,,,,,,,,,,-,,if the component is created on the specified date DEL ,,,,,,,,,,-,,if the component is deleted on the specified date Information about the meaning of the remaining structure fields can befound in the relevant data element documentation in the ABAPdictionary.Description The structure contains - by entering the variant BOM number - theassignments of the assembly materials to the BOM groups. For this, the following attributes have to be valuated: MATERIAL,,-,,Material ALTERNATIVE_BOM,,-,,Alternative BOM The attribute PLANT has to have an (existing) plant, if it concerns aa plant BOM, that means that the field plant BOM CREATED_IN_PLANT isfilled with a plant in the structure BOMGROUP. If reversed so that thefield CREATED_IN_PLANT is initial in the structure BOMGROUP, that meansit concerns a group BOM, then an assignment record with PLANT = ' '(BLANK) has to be copied for each material and alternative. Information about the meaning of the remaining structure fields can befound in the relevant data element documentation in the ABAPdictionary. All the messages that occured during the creation of the BOM group arecollected in this table. Should inconsistencies occur in the data thenthese can be included as the basis for its correction. The structure contains assignments of the subitems to the items. For this, the following attributes have to be valuated: SUB_OBJECT_TYPE,,-,,fixed value 'SUI' SUB_OBJECT_ID,,-,,unique maximum 32 characters identification of thesubitem within the group SUPER_OBJECT_TYPE,,-,,fixed value 'ITM' SUPER_OBJECT_ID,,-,,unique maximum 32 characters identification of theitem within the group Description The subitem data is transferred in this structure. In order to assign the subitems to the BOM group, the fieldBOM_GROUP_IDENTIFICATION has to be included with the value contained inthe BOMGROUP structure. In addition the following attributes have to be valuated to ensure theidentification of the subitem in the group OBJECT_TYPE,,,,,,- ,,fixed valuet 'SUI' OBJECT_ID,,,,,,- ,,unique maximum 32 characters identification in thegroup Information about the meaning of the remaining structure fields can befound in the relevant data element documentation in the ABAPdictionary. The text lines of the long texts assigned to objects, are transferredin this structure. In order to assign the text to a BOM group object the fieldBOM_GROUP_IDENTIFICATION has to be included with the value contained inthe BOMGROUP structure. In addition, the following attributes have to be valuated in order toidentify the object to which the long text is assigned. OBJECT_TYPE,,- ,,value ''BGR' or 'BOM' or 'ITM' OBJECT_ID,,- ,,unique maximum 32 characters object identificationwithin the group. Information about the meaning of the remaining structure fields can befound in the relevant data element documentation in the ABAPdictionary. Variant-specific data is transferred in this structure. To assign the variants/alternatives to the BOM group, the fieldBOM_GROUP_IDENTIFICATION has to be included with the value contained inthe BOMGROUP structure. In addition, the following attributes have to be valuated to ensure theidentification of the variants/alternatives within the group. OBJECT_TYPE,,,,,,- ,,fixed value 'BOM' OBJECT_ID,,,,,,- ,,unique maximum 32 character object identification inthe group One of the following values has to be defined in the field FUNCTION: NEW,,,,,,,,-,,if the variant runs (on given key date) DEL,,,,,,,,-,,if the variant is discontinued (on given key date) Information about the meaning of the remaining structure fields can befound in the relevant data element documentation in the ABAPdictionary.
|