‎2007 May 14 12:13 PM
Hi.
I am calling BAPI_GOODSMVT_CREATE to post 2 goods movements one after the other (501 and 541). I am using BAPI_TRANSACTION_COMMIT, with the wait option after both the movements. (This is not being called in an update task, which might be evident from the call to BAPI_TRANSACTION_COMMIT).
The problem is that immediately after the 501 movement, if I try and post the 541 movement, the call to the BAPI fails. The error is that the data is locked with my user ID. Now if I put a WAIT UP TO n SECONDS, statement, the program works fine. My reasoning is that the control is returned to the program while there is some processing happening at the backend.
The program is working fine now, but using a WAIT UP TO.. doesn't seem an elegant approach. Could anyone suggest anything?
‎2007 May 14 12:31 PM
You can try 'SET UPDATE TASK LOCAL. ' before your BAPI call. It should work as it will stay in the user context as far as I remember.
Peter
‎2007 May 14 12:31 PM
You can try 'SET UPDATE TASK LOCAL. ' before your BAPI call. It should work as it will stay in the user context as far as I remember.
Peter
‎2007 May 14 12:58 PM
‎2007 May 14 1:26 PM