Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add components to a Production Order using CO_XT_COMPONENT_ADD Function module

adityamani369
Explorer
0 Kudos

I have a requirement where I need to create a production order and then delete the existing components which is fetched from BOM and later add a component manually.

I could able to create Production order and delete the existing component. But I was unable to add components of my choice manually from the program. I was using CO_XT_COMPONENT_ADD function module to add the component into the production order. But by doing so I am getting a RAISE_EXCEPTION dump as the internal table AFGV_BT is not filled. So I suppose we need to use some other FMs to populate that internal table.

So could anyone please help me out in achieving this requirement of adding a component in a Production order.

1 ACCEPTED SOLUTION

adityamani369
Explorer
0 Kudos

I have found out the way to solve the dump. We need to use CO_XT_ORDER_INITIALIZE BAPI to fill the internal table after deleting the components using CO_XT_COMPONENTS_DELETE.

Refer to the following link for more information regarding Addition and deletion of components in a Production order.

https://blogs.sap.com/2018/05/14/addition-deletion-of-component-in-a-production-order/

1 REPLY 1

adityamani369
Explorer
0 Kudos

I have found out the way to solve the dump. We need to use CO_XT_ORDER_INITIALIZE BAPI to fill the internal table after deleting the components using CO_XT_COMPONENTS_DELETE.

Refer to the following link for more information regarding Addition and deletion of components in a Production order.

https://blogs.sap.com/2018/05/14/addition-deletion-of-component-in-a-production-order/