09-22-2015 7:05 AM
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
09-22-2015 7:48 AM
Hi,
Try,
Validating the code by.
CHECK sy-tcode = 'MIGO'. " BADI.
Hope it helpful,
Regards,
Venkat.
09-22-2015 7:17 AM
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.
09-22-2015 7:48 AM
Hi,
Try,
Validating the code by.
CHECK sy-tcode = 'MIGO'. " BADI.
Hope it helpful,
Regards,
Venkat.
09-22-2015 8:17 AM
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.
09-22-2015 9:26 AM
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.
09-22-2015 9:36 AM
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
09-22-2015 10:08 AM
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.