cancel
Showing results for 
Search instead for 
Did you mean: 

PO sucontracting BoM update with BAPI_PO_CHANGE

andrea_dn
Explorer
0 Kudos

Dear,

I am working in a ETO business scenario. The subcontracting material has a configurable BoM with dependencies activated based on sales order configuration. After MRP, I create the Purchase Order for subcontracting with the configured BoM assigned (bom type M, linked to the material).

Then, I create an order BoM (bom type K, linked to the sales order position) and make manual changes.

I have a program which is comparing the new order BoM with the list of components of the PO (found in RESB). I compare components and quantities and the program launches BAPI_PO_CHANGE to update the BoM of the PO subcontracting.

The program was working fine before we implemented standard configurable BoM (type M) assigned to the material. After this implementation, the BAPI was giving an error because it was not able to explode the configurable BoM. We solved this issue implementing SAP Note 3096222 to correctly explode the BoM and the issue was solved.

However, we have another issue when running the BAPI for several components, some of them to be deleted in the PO subcontracting BoM (because we deleted them in the order BoM during manual changes) and other to modify the quantity.

When I run the BAPI_PO_CHANGE, it is not correctly updating the BoM. First time I launch it, it seems that it is only removing the components to be removed. Thus, I launch it again to update the components with different quantity, but in this case it seems that it is re-adding the previously removed components.

I make an example: I have a BoM of 100 components. I want to delete 30 components and modify quantity of other 10 components.

After I run the BAPI, it is removing only the 30 components. Then, I run again the BAPI to modify the others, but the result is that 10 components are modified, 30 components (previously removed) are added again to the BoM of PO

It seems that the BAPI is re-adding the components as if some internal table has not been cleared after first BAPI run, or the BAPI is considering the old version of the BoM and not the last one updated.

Could someone help me, please?

Thanks

Accepted Solutions (0)

Answers (0)