Application Development and Automation 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: 
Read only

Serial No. lock Issue while Updating Inbound Delivery using BAPI

Former Member
0 Likes
1,126

Dear All,

I am working on changing of Inbound delivery scenarion.

I am updating batch & serial data in the existing inbound delivery

using BAPI_INB_DELIVERY_CHANGE.

However when multiple inbound delivery updates is done using batch job

in some cases I get the error

"Serial No. &1 is already locked by user &2".


I have given commit & wait, dequeue_all before calling the bapi

that updates the data in inbound delivery but still in some scenrio

I get the above error.

How can this error be fixed.

Any valuable input/suggesstion would be appreciated.

Thanks

Jitendra

Dear All,

I am working on changing of Inbound delivery scenarion.

I am updating batch & serial data in the existing inbound delivery

using BAPI_INB_DELIVERY_CHANGE.

However when multiple inbound delivery updates is done using batch job

in some cases I get the error

"Serial No. &1 is already locked by user &2".


I have given commit & wait, dequeue_all before calling the bapi

that updates the data in inbound delivery but still in some scenrio

I get the above error.

How can this error be fixed.

Any valuable input/suggesstion would be appreciated.

Thanks

Jitendra

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
764

Try to lock the SN yourself with FM ENQUEUE_EIEQSE  and WAIT option in a LOOP (and unlock it before calling BAPI).

NB: Also remove the DEQUEUE_ALL (not best practices, gives a taste of panic coding, and not efficient as it will not remove the lock of update task, hopefully)

Regards,

Raymond

Read only

arseni_gallardo
Active Participant
0 Likes
764

Hello,

I guess that the locks are kept by an update module so try using "SET UPDATE TASK LOCAL." just before every call of the BAPI.

Regards