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

Table Lock Error

Former Member
0 Likes
458

Hi All,

We have our own workflow tool to process consignment idocs. Here we call MB11 transaction using synhoronous mode twice to do material movements.Couple of weeks ago what happended was it did 632 movement (reduce in transit stock) but failed to do 631 (increase stock in consignment location) due to table lock error which was caused by first movement. When it attempted to do the second one it failed. We believe it to be a SAP Performance issue since we had a major roll out the same week which had resulted in more system usage. It had caused serious problem since the goods did not reach the destination. So to avoid this critical issue what i did was, i put 2 seconds delay while calling MB11 transaction for the second time and it had solved the issue. But my question is , is this an ideal solution? Or should i handle it in a different way? Please advice.

3 REPLIES 3
Read only

Former Member
0 Likes
374

You could do a COMMIT WORK AND WAIT after the first call to MB11. This will cause the program to wait until the synchronous updates (in update task) have finished. At that point the locks from the first MB11 call will be released as well and you will not get a lock issue when calling MB11 a second time.

Regards,

Michael

Read only

0 Likes
374

We are calling MB11 transaction in synchronous mode. Does it implicity does commit work and wait?

Read only

0 Likes
374

If you call the transaction with the using and update (S) additions it is supposed to do exactly this. Check in the debugger, if this is really the case by setting a breakpoint in the posting routine and activating update debugging (it is in include MM07MFB9_BUCHEN_AUSFUEHREN - form buchen_ausfuehren). Make sure, that you jump back into the calling program only if all update functions have been completed. If this is not the case, there might be a problem with your parameters when you call the transaction. But at least you then know, what is going on.

Regards,

Michael