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: 

BAPI_GOODSMVT_CREATE used and output shows locked for different item

Former Member
0 Kudos

Hi experts,

The program is using BAPI " BAPI_GOODSMVT_CREATE" in a loop ( that is single item everytime )

and then BAPI TRANSACTION COMMIT has used ( with no parameters) . When we are selecting more than one item for the same material , for the first item its get posted successfully but for other it shows error that "ponumber/itemnumber is locked by the user" .

Now I guess this error is due to the system load as when I am running this in debugging mode all the items get posted successfully . So I think we need to put some time delay between two items.

Please provide me some solutions and ways to resolve it asap.

1 REPLY 1

0 Kudos

Hi Anindita,

After calling BAPI_GOODSMVT_CREATE , if the return table is empty, you can set the wait parameter in the FM BAPI_TRANSACTION_COMMIT as below. This iwill do the trick.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

  • IMPORTING

  • RETURN =

.