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

BADi / User exit after MIGO COMMIT ?

Ash_ok
Contributor
0 Likes
1,119

Hi !

We need to populate some characteristic values for a batch of a material while running txn. code MIGO, after the MIGO COMMIT. We have used BADi 'MB_DOCUMENT_UPDATE' to write the bespoke code. However, while updating the characteristic values, using FM 'VB_CHANGE_BATCH', we are getting EXCEPTION 'lock_on_plant'.

This sounds like FM 'VB_CHANGE_BATCH' is COMMITting at the same time / before MIGO is COMMITting. Is there a BADI / user exit that works after MIGO COMMIT ?

Cheers,

Ashok.

3 REPLIES 3
Read only

messier31
Active Contributor
0 Likes
558

Hi Ashok,

Following are the exits and BADI for update in MIGO transaction

EXIT : MB_CF001

BADI : 1. MB_CIN_LMBMBU04

2. MB_DOCUMENT_UPDATE

Try these..see if this helful to you..

Enjoy SAP.

Pankaj Singh.

Read only

0 Likes
558

Hi Pankaj,

We are currently using BADi 'MB_DOCUMENT_UPDATE' and it doesn't seem to do the job we want as we are getting the EXCEPTION 'lock_on_plant'.

Isn't BADi 'MB_CIN_LMBMBU04' for creating excise documents ? Is it a CIN version BADi by any chance ?

Any other inputs ??

Cheers,

Ashok.

Read only

Ash_ok
Contributor
0 Likes
558

Hi !

Setting the value for the field 'BYPASS_LOCK' to 'X', I am able to avoid the exception 'lock_on_plant'.

SAP says that it is not possible to create a batch and change it's characteristic values, other than the batch expiration date, in MIGO using BADi 'MB_DOCUMENT_UPDATE', as the create and change would be part of the same LUW.

Note 92550 lists the inconsistencies that can occur if a separate COMMIT is called in the user exit / BADi.

Cheers,

Ashok.