2013 Jul 12 10:34 AM
Hi All,
I am facing an issue while using MB_MIGO_BADI for MIGO validations when click on post button(for cancellation of doc).
I set a break point and checked the structure for docno and fyear it's blank for both check_header and check_item.
why BADI is not giving any input values? any clue?
while creating implementation have chosen option copy sample code.
Thank you.
2013 Jul 15 7:13 AM
Hi Venkat,
You can write your validation code in this method,IF_EX_MB_MIGO_BADI~PAI_DETAIL.
Here the table G_GOITEM will give you all the details include Materials document No. and Year.
Declare structure like,
DATA WA_GOITEM LIKE LINE OF G_GOITEM.
If you want to loop the table G_GOITEM. as we have to declare 'work area' explicitly in methods (OOPS Concept).
Hope this will help you.
2013 Jul 12 11:21 AM
Hi Venkata,
Have you put a break point in METHOD if_ex_mb_migo_badi~post_document ?
Check structure - IT_MSEG and IS_MKPF .
With Regards,
Debopriya Ghosh
2013 Jul 12 1:04 PM
Hi Venkat,
You will get Material Document No and Year in IS_MKPF structure in IF_EX_MB_MIGO_BADI~POST_DOCUMENT Method.
Fields:is_mkpf-mblnr,
is_mkpf-mjahr.
2013 Jul 15 3:11 AM
Hi All,
Thank you for you early response,
POST_DOCUMENT is last step in posting, by the time reaching method POST_DOCUMENT cancellation document is generated, it should not be the case. any message in POST_DOCUMENT should be type A or X.
In my requirement it's just validations at header level when cancellation document is posted.
Regards.
2013 Jul 12 8:07 PM
Venkata Reddy wrote:
...
why BADI is not giving any input values?
...
To answer your question, I suspect that the document and item numbers have not yet been determined, since the material document has not yet been posted. The purpose of the "CHECK" methods is to give you a chance to prevent the posting of the Material Document before it happens, and you shouldn't need to make that determination based on the document and item numbers.
2013 Jul 15 7:13 AM
Hi Venkat,
You can write your validation code in this method,IF_EX_MB_MIGO_BADI~PAI_DETAIL.
Here the table G_GOITEM will give you all the details include Materials document No. and Year.
Declare structure like,
DATA WA_GOITEM LIKE LINE OF G_GOITEM.
If you want to loop the table G_GOITEM. as we have to declare 'work area' explicitly in methods (OOPS Concept).
Hope this will help you.
2013 Jul 15 8:36 AM
Hi All,
Thanks for every one, it is resolved by using badi MB_CHECK_LINE_BADI.
Regards,