Hi ,
This page will provide you with the information like how we can create a material BOM along with the alternate No using BAPI_MATERIAL_BOM_GROUP_CREATE.The reasons why we have to go for this BAPI are:
1. CSAP_MAT_BOM_CREATE do not provide the option of creating BOM along with the alternate no.Whenever we use this function module, material BOM will be created with a default alternate no value i.e. 01.
2. CSAP_MAT_BOM_MAINTAIN can also be used to create a material BOM but it also does the same as CSAP_MAT_BOM_CREATE while creating material BOM.
So, inorder to achieve some real time solutions like creation of Material BOM along with the different alternate nos which usually happens in third party systems .The solution for this is to use the BAPI_MATERIAL_BOM_GROUP_CREATE inorder to create material BOM along with the different alternate nos.
Prerequisites for using BAPI_MATERIAL_BOM_GROUP_CREATE are :
1. All the required materials/parts which will be used while creating material BOM have to created in SAP system before using this.
2. Required Engineering Change Number has to be created in SAP system and its staus should be in active state before using this.
Note: Explicit commit work has to be done after using this BAPI. If this BAPI has been called from an external/third party system then BAPI_TRANSACTION_COMMIT has to be executed after executing this BAPI.
Following is the example of simple input data which can be used to create a material BOM along with the different alternate nos.
Table Name | Value | |
BOMGROUP | ||
BOMGROUP-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1' -à For unique Identification of BOM group. | |
BOMGROUP-OBJECT_TYPE | 'BGR'. | |
BOMGROUP-OBJECT_ID | 'BOMGROUP1' | |
BOMGROUP-TECHNICAL_TYPE | 'M'. | |
BOMGROUP-USAGE | '1' ( for Production) . Refer table T416 for various BOM Usage values. | |
BOMGROUP-BOM_GROUP | 'BOMGROUP1' | |
BOMGROUP-CREATED_IN_PLANT | '1100'. | |
BOMGROUP-LTXT_LANG | 'EN' | |
BOMGROUP-BOM_TEXT | 'Created Using BAPI_MATERIAL_BOM_GROUP_CREATE'. | |
VARIANTS | ||
BOM1 with Alternative BOM No -11 | ||
VARIANTS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
VARIANTS-OBJECT_TYPE | 'BOM'. | |
VARIANTS-OBJECT_ID | 'BOM1'. (External Material /part number which you want to create as material BOM) | |
VARIANTS-ALTERNATIVE_BOM | '11'. | |
VARIANTS-BOM_STATUS | '01' (Active) | |
VARIANTS-BASE_QTY | '100'. | |
VARIANTS-BASE_UNIT | 'EA'. | |
VARIANTS-LTXT_LANG | 'EN'. | |
VARIANTS-LANGU_ISO | 'EN'. | |
VARIANTS-ALT_TEXT | 'BOM1 created using BAPI_MATERIAL_BOM_GROUP_CREATE'. | |
VARIANTS-CHANGE_NO | 'ECN1'. | |
VARIANTS-FUCNTION | 'NEW'. | |
BOM1 with Alternative BOM No -12 | ||
VARIANTS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
VARIANTS-OBJECT_TYPE | 'BOM'. | |
VARIANTS-OBJECT_ID | 'BOM1'. (External Material /part number which you want to create as material BOM) | |
VARIANTS-ALTERNATIVE_BOM | '12'. | |
VARIANTS-BOM_STATUS | '01' (Active) | |
VARIANTS-BASE_QTY | '100'. | |
VARIANTS-BASE_UNIT | 'EA'. | |
VARIANTS-LTXT_LANG | 'EN'. | |
VARIANTS-LANGU_ISO | 'EN'. | |
VARIANTS-ALT_TEXT | 'BOM1 created using BAPI_MATERIAL_BOM_GROUP_CREATE'. | |
VARIANTS-CHANGE_NO | 'ECN1'. | |
VARIANTS-FUCNTION | 'NEW'. | |
ITEMS | ||
ITEMS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
ITEMS-OBJECT_TYPE | 'ITM'. | |
ITEMS-OBJECT_ID | 'BOM1'. | |
ITEMS-ITEM_NO | '0010'. | |
ITEMS-ITEM_CAT | 'L'. (Stock Item) Refer Table T418 for suitable Item category. | |
ITEMS-COMPONENT | 'MAT1'. (material/part number to be assigned as BOM component) | |
ITEMS-COMP_QTY | '100'. | |
ITEMS-COMP_UNIT | 'EA'. | |
ITEMS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
ITEMS-OBJECT_TYPE | 'ITM'. | |
ITEMS-OBJECT_ID | 'BOM1'. | |
ITEMS-ITEM_NO | '0020'. | |
ITEMS-ITEM_CAT | 'L'. (Stock Item) Refer Table T418 for suitable Item category. | |
ITEMS-COMPONENT | 'MAT2'. (material/part number to be assigned as BOM component) | |
ITEMS-COMP_QTY | '100'. | |
ITEMS-COMP_UNIT | 'EA'. | |
MATERIALRELATIONS | ||
MATERIALRELATIONS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
MATERIALRELATIONS-MATERIAL | 'BOM1'. | |
MATERIALRELATIONS-PLANT | '1100'. | |
MATERIALRELATIONS-BOM_USAGE | '01'. | |
MATERIALRELATIONS-ALTERNATIVE_BOM | '11'. | |
MATERIALRELATIONS-LOT_SIZE_FROM | 1 | |
MATERIALRELATIONS-LOT_SIZE_TO | '1000'. | |
MATERIALRELATIONS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
MATERIALRELATIONS-MATERIAL | 'BOM1'. | |
MATERIALRELATIONS-PLANT | '1100'. | |
MATERIALRELATIONS-BOM_USAGE | '01'. | |
MATERIALRELATIONS-ALTERNATIVE_BOM | '12'. | |
MATERIALRELATIONS-LOT_SIZE_FROM | 1 | |
MATERIALRELATIONS-LOT_SIZE_TO | '1500'. | |
ITEMASSIGNMENTS | ||
ITEMASSIGNMENTS-BOM_GROUP_IDENTIFICATION | 'BOMGROUP1'. | |
ITEMASSIGNMENTS-SUB_OBJECT_TYPE | 'ITM'. | |
ITEMASSIGNMENTS-SUB_OBJECT_ID | 'BOM1'. | |
ITEMASSIGNMENTS-SUPER_OBJECT_TYPE | 'BOM'. | |
ITEMASSIGNMENTS-SUPER_OBJECT_ID | 'BOM1'. | |
ITEMASSIGNMENTS-CHANGE_NO | 'ECN1'. | |
ITEMASSIGNMENTS-FUNCTION | 'NEW'. | |