‎2016 Apr 25 10:41 PM
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
‎2016 Apr 26 2:48 AM
‎2016 Apr 26 12:52 PM
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.
‎2016 Apr 26 12:57 PM
Another thing that I could suggest to investigate is SAP Lock Concept - The SAP Lock Concept (BC-CST-EQ) - SAP Library.