cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_PRODORD_CREATE_FROM_PLORD commit issues.

0 Likes
1,693

Hi All,

I am working on an Idoc which calls my function module, when we receive sales order from Non-SAP system, we check if there is any production order exist for it, if not then we check for planned orders, here planned orders can be multiple.
So we are looping on planned orders and using BAPI BAPI_PRODORD_CREATE_FROM_PLORD to convert the planned orders to Production orders.

Now after converting, we are changing the start and end date of the production order, However when the BAPI_PRODORD_CHANGE is in the loop sometimes only 1 Production order date is getting updated and not for the second one.

I have added the "commit work and wait" statement after every BAPI call but this issue still occurs sometimes.

Can anyone please help me on this.


Accepted Solutions (0)

Answers (1)

Answers (1)

vijay_hariharan
Contributor
0 Likes

Hello Tushant,

This happens sometimes.. Somethings can i can suggest is:
If possible first run the loop to first create the Orders, Commit & store the Order numbers.. Next run a loop again on the Order numbers and update the date and Commit..
You may also check this insightful Blog below:
https://blogs.sap.com/2013/01/24/commit-work-and-wait-does-not-work-as-expected-or-why-to-use-wait-u...

Regards,
Vijay