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

Dequeue Batch/Material

prabhu_s2
Active Contributor
0 Likes
1,000

Hi,

Upon GR i need to carry out GI also. Hence I did configure output type for GR that would trigger a program as part of output determinatioin procedure. Here in this program i'm using bapi call for doing GI. Now, the problem is when i execute it and check in debug mode the bapi call is returning error message "Batch XXXX of material XXXX83 is already locked by <MY UID>".

The lock object corresponding to this as checked in SM12 is EMMCH1E. But when using the dequeue function, i couldnt still see the lock in sm12. is there a way to sort it out?

2 REPLIES 2
Read only

mvoros
Active Contributor
0 Likes
635

Hi,

it's not a good idea to remove that lock. There is a good reason for it. If you remove it then you may get inconsistencies in your system. I strongly advice you not to remove that lock.

You need to find a different way how to create GI automatically after GR creation. One way is to submit a background job which will wait until GR is created and then it will create GI. Another possible way is to use workflow for this.

Cheers

Read only

prabhu_s2
Active Contributor
0 Likes
635

Got hold of a note:

SAP Note 157423 - Message M3682 for goods movement to the same batch

Hopefully this should be of help