Skip to Content
0
Former Member
May 25, 2008 at 10:58 AM

Issue with BAPI_PO_CHANGE: purchase order locked

767 Views

I'm experiencing problems with the following scenario:

1. change purchase order with RFC BAPI_PO_CHANGE

2. wait 30 seconds

3. post goods issue using IDoc MBGMCR01

When performing step 3, I get in 20% of the cases the error that the PO is still locked by the RFC user in the R/3 system (user PIREMOTE already processing purchase document 123456789). I have tried to extend the wait step to 10 minutes, but the same issues still remains.

I've also tried executing BAPI_TRANSACTION_COMMIT (with and without wait) and BAPI_DOCUMENT_DEQUEUE between step 1 and 2. Neither worked.

Debugging BAPI_PO_CHANGE using SE37 didn't give any results. I noticed that the PO was still locked even when the processing of BAPI_PO_CHANGE in SE37 had finished. Somehow R/3 is locking the purchase document for a very long time in 20% of the cases. During the execution of the module enough work processes are available and no jobs are running.

Has anyone ever experienced something like this and has an idea where to look next?