‎2007 Aug 27 11:14 AM
Hi all,
i want to upload bom using bapi, iam using BAPI_MATERIAL_BOM_GROUP_CREATE to upload.
i want to know bom group identification, object id, obj. etc.
can any body provide me sample code for this.
‎2007 Aug 27 11:17 AM
Hi,
BOM_GROUP_IDENTIFICA " "
OBJECT_TYPE BGR
OBJECT_ID 00000001
TECHNICAL_TYPE M
BOM_USAGE 1
BOM_GROUP
CREATED_IN_PLANT 3010
There are filled in BOM group group identification and BOM_GROUP as it was used to create the BOM .
Regards,
Sankar
‎2007 Aug 27 11:27 AM
hi
good
FYI
Symptom
You want to transfer BOM groups to the R/3 via function module BAPI_MATERIAL_BOM_GROUP_CREATE.
How can I call the function module?
Reason and Prerequisites
Function module BAPI_MATERIAL_BOM_GROUP_CREATE is documented
First of all, read the function module documentation.
The function module can be called via the Data Transfer Workbench (Transaction SXDA).
If the function module is supposed to be called directly from an individual program and if problems occur in this case, you should copy the desired BOM data transfer about the ALE entry as described under 'Solution', as well as analyze the call of the function module from the ALE entry and then adjust the call of the function module in your program.
Solution
1. Set a breakpoint in the source code of function module BAPI_MATERIAL_BOM_GROUP_CREATE.
2. Create a BOM group manually with those objects (for example alternatives/variants, long texts, subitems, history, plant assignments) that you want to transfer.
3. Execute program MAT_BOMGROUP_CREATE_SAMPLE. Specify material, plant and use of the created BOM group as selection conditions, initialize the checkbox 'Test run without data backup' and press 'Execute (F8)'.
Note: Program MAT_BOMGROUP_CREATE_SAMPLE is included in the Data Transfer Workbench (SXDA).
4. Program MAT_BOMGROUP_CREATE_SAMPLE issues the number of the created IDoc in the status indicator line. Note down the IDoc number. If you should have ignored the status message with the IDoc number, you can subsequently search for the IDoc number with Transaction WE05. In Transaction WE05 restrict the IDoc search on the current day and basic type 'MATERIALBOM_CREATEBOMGROUP01' or logical message category 'MATERIALBOM_CREATEBOMGROUP'.
5. Function module BAPI_MATERIAL_BOM_GROUP_CREATE can only create but not change BOM groups. In order to be able to book in the created IDoc successfully, you must either physically delete the BOM group selected for the IDOC generation from the database (that is, to be deleted without change number) or you must subsequently change the created IDoc so that the IDOC creates a non-existing BOM group. You can achieve this by calling the IDoc number in Transaction WE19 and change the BOM usage (Field BOM_USAGE), for example in IDoc segments E1BP1080_BGR_C and E1BP1080_MBM_C .
6. Call the IDoc number via Transaction WE19. Choose 'Inbound Function Module'. Enter function module name 'IDOC_INPUT_MAT_BOMGROUP_CREATE' in the dialog box. Press 'Enter'. Now the transaction stops at the defined breakpoint in function module BAPI_MATERIAL_BOM_GROUP_CREATE.
7. Check, how BAPI_MATERIAL_BOM_GROUP_CREATE is called in the SAP Standard system. Adjust the call according to BAPI_MATERIAL_BOM_GROUP_CREATE from within your own program.
thanks
mrutyun^
‎2007 Aug 27 12:00 PM