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

Locking Issues while creating TOs using L_TO_CREATE_DN

Former Member
0 Likes
1,078

Hello,

I am trying to create putaway transfer order based on inbound delivery. If there exists more line items(ex: 100 items or more), it starts displaying locking errors from second item. I presume that it tries to process from 2nd item even though lock still exists on first item.

14506, 9123452, 3891645, 54509 are materials, DHARMAG is the user name and 1900056735 is the inbound delivery

I concatenated material to the message to know which line it is.

00000000000000014506 Delivery Document 1900056735 currently being processed by DHARMAG

00000000000009123452 Delivery Document 1900056735 currently being processed by DHARMAG

00000000000003891645 Delivery Document 1900056735 currently being processed by DHARMAG

00000000000000054509 Delivery Document 1900056735 currently being processed by DHARMAG


FM documentation says,


If the function module is called up several times in a program, a COMMIT WORK should be placed between the calls and the blocks set up should be removed.

.

I placed the commit work between the calls but I don't know how to remove blocks set up between the calls.

Can someone please help.

Thanks,

Dharma

3 REPLIES 3
Read only

Former Member
0 Likes
685

Try adding the WAIT UP TO n SECONDS. Or Commit Work and Wait.

Read only

0 Likes
685

     Had really similar situation but with another SAP module. Commit work and wait is correct.

But..... I would suggest to check lock on order before processing of any item.

     So, if system sees that order is unlocked - it feels free to change it. If order is locked you might

wait some time and check again ( keep in mind, it could be actually opened in transaction ). so max attempts should be there for sure.

     That way you would be more sure that you are not changing locked object.

Hope helpfull.

Read only

pavlo_denysyuk
Participant
0 Likes
685

Another thing that I could suggest to investigate is SAP Lock Concept - The SAP Lock Concept (BC-CST-EQ) - SAP Library.