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: 

regarding MB_MIGO_BADI in FM bapi_goodsmvt_create

Former Member
0 Kudos

Hi All,

I have implemented method 'POST_DOCUMENT' of BADI 'MB_MIGO_BADI' as per business requirement. When user is doing GR using MIGO, this BADI is working as per requirement, but when I am using FM BAPI_GOODSMVT_CREATE for doing goods movement, this BADI is getting called though material document is getting generated and MKPF, MSEG are getting updated as per requirement.

Please help me on how to resolve this issue.

Thanks

1 ACCEPTED SOLUTION

VenkatRamesh_V
Active Contributor
0 Kudos

Hi,

Try,

Validating the code by.

CHECK sy-tcode = 'MIGO'.   " BADI.

Hope it helpful,

Regards,

Venkat.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Are you trying to give a message based on your requirement in this method.

If you check the documentation for this method you will find that message should only be given of type A or X.

Please check the detailed documentation of the BADI.

Hope this helps.

VenkatRamesh_V
Active Contributor
0 Kudos

Hi,

Try,

Validating the code by.

CHECK sy-tcode = 'MIGO'.   " BADI.

Hope it helpful,

Regards,

Venkat.

0 Kudos

Issue is, the BADI's method 'POST_DOCUMENT' is not called when doing GR using FM BAPI_GOODSMVT_CREATE. When i am using MIGO, THEN this BADI's method 'POST_DOCUMENT' is called.

0 Kudos

Hi,

For the same reason I suggested to read the documentation of the BADI which mentions that this BADI is only called for MIGO transaction.

Instead you can try using BADI MB_DOCUMENT_BADI.

Hope this helps.

sujeet2918
Active Contributor
0 Kudos

Hi Aamir,

first you need to use FM to create goods moment and then only you can use GR BADI. What is the requirement that you have used GR Badi, are you using it for validation?

Explain the Requirement.

Regards,

Sujeet

former_member210541
Active Participant
0 Kudos

MB_MIGO_BADI is MIGO specific.

For other transactions like MB01 / MB1A / MB1B etc you have to use MB_DOCUMENT_BADI, but this BADI wont allow to throw error messages, instead you can use MB_CHECK_LINE_BADI for validation and error messages.