Application Development 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: 

Need a BADI or user exit for MB1A posting while doing MIGO

Former Member
0 Kudos

Dear ABAPERS,

                       Our requirement is to do MB1A goods issue while posting MIGO document. Now we are calling 'BAPI_GOODSMVT_CREATE' inside the BADI MB_DOCUMENT_BEFORE_UPDATE with using  JOB_OPEN and JOB_CLOSE. Hence our issue is system is not allow to use the same material for goods issuing using the BAPI, and the BAPI error is "The plant data of the material XXXXXX is locked by the user YYYYY",because that material is using in MIGO transaction at the same time.Please give me solution to overcome this issue.

1 REPLY 1

thanga_prakash
Active Contributor
0 Kudos

Hello Ramesh,

I guess your code is as below.

1) JOB_OPEN


2) BAPI_GOODSMVT_CREATE


3) COMMIT WORK


4) JOB_CLOSE.


Try like below.


before commit work wait for <n> seconds. So you get a time to get out of the transaction MIGO before the bapi is committed.


Regards,

Tp