‎2006 Dec 27 5:45 AM
hi,
can you provide me the feasible exit for the following requirement in MIGO tcode.
the requirement is to enhance goods receipting process through an alteration to transaction MIGO. The business requires that the field GOHEAD-FRBNR is a mandatory entry only under certain circumstances and optional the rest of the time. The basic details for the requirement are as follows:
When posting a goods receipt through transaction MIGO, the user exit should identify the account group of the Purchase Order Vendor by reading GOHEAD-LIFNR for the Vendor number and then finding the account group in LFA1-KTOKK. If LFA1-KTOKK = "KINF" then GOHEAD-FRBNR is mandatory, else, GOHEAD-FRBNR is optional.
exits are as follows.
Exit Name Description
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
thanks®ards,
‎2006 Dec 27 7:07 AM
Use BADI instead.
BADI: MB_DOCUMENT_BADI.
Method: MB_DOCUMENT_BEFORE_UPDATE.
Here loop at XMSEG for LIFNR field.
Using LIFNR select on LFA1 get KTOKK.
loop at XMKPF.
if LFA1-KTOKK eq 'KINF' and XMKPF-FBRNR is initial
message e398(00) with 'FBRNR is mandatory'.
endif.
endloop.
‎2006 Dec 27 9:53 AM
hI Sharath,
Thanks for the reply ,...
But I would like to know the badi
MB_DOCUMENT_BADI will be triggered with MIGO tcode execution or not.
i.e I want to know at which instance of the MIGO tcode execution this badi wuld be triggered .
Is there any otherway to achieve this ....
I found the following BADI s in MIGO program .
BADI_MB_MIGO BADI_MB_MIGO_ITEM .
bUT When i tried to see the definitions of the same They are not exist in the system .
could you please help me in this regard.
thanks for the early answers .
regards,.
Message was edited by:
shishupalreddy ramreddy
‎2006 Dec 27 10:50 AM
Hi,
The badi that i mentioned gets triggerred when a SAVE is pressed on MIGO screen.
There is another badi: MB_CHECK_LINE_BADI which gets triggerred whenever changes are made to the item of the document. Try this one.
‎2006 Dec 27 11:33 AM
Hi Sharath,
There no such BADI called in MIGO program but the badi called in this is
MB_MIGO_BADI inthis we have a method post_document .
Can you please tell me whthere that can be applied if so How ?
Thanks Regards
‎2006 Dec 28 6:08 AM
hai ,
Can you please provide the feasible solution to solve this issue asap .
Thanks Regards,
‎2006 Dec 28 6:11 AM
MB_MIGO_BADI is used for adding custom screens so you cannot use that for your requirement, I am very suprised that badi's that i mentioned are not getting triggerred at any point.
1. have you first of all created a dummy implementation and then put a break point there to check whether the badi's are getting triggerred, if not then you should do that first.
2. if MB_MIGO_BADI is getting triggerred then the other badi's will/should get triggerred.
Note: Pls award points for helpful answers.
‎2006 Dec 28 8:03 AM
Hi Sharath,
I tried the BADI u mentioned with breakpoint and it was not triggering at all ...
‎2006 Dec 28 11:20 AM
Hi Sharath,
I tried by implemeting the BADI MB_DOCUMENT_SAVE but the same is not available in MIGO program (SAPLMIGO) .But i find the other BADI in that wht i told you .''
It is urgent can you please provide me the correct solution to accomplsih the requirement .
thanks
‎2006 Dec 28 12:22 PM
All I did was:
1. Enter MIGO transaction.
2. Choose Goods Reciept and then enter a purchase order.
3. fill all the mandatory fields.
4. Click on Button 'CHECK'.
5. At this point i had swithced on debugger, but a break point on method GET_INSTANCE of BADI: CL_EXITHANDLER.
6. I could clearly see MB_CHECK_LINE_BADI getting triggerred.
Please do the same and let me know.
‎2006 Dec 28 1:22 PM
Hi Sharath,
Thanks lot for the reply ...and I would be gr8 if U could send me the clear screen shots with debugging to my mail id reddy_abap79@rediffmail.com.
Because I could not find whether that was triggered or not .
Please do this help.
thanks
‎2006 Dec 28 2:29 PM
‎2006 Dec 29 5:38 AM
Hi Sharath,
Thanks a lot for the reply , but still iam havng a doubt .
the following method which u said was triggering but here the BADI name is hardcoded in our sap server so i could not foind the BADI s u mentioned .
call method cl_exithandler=>get_instance
EXPORTING exit_name = 'MB_MIGO_BADI' "552774
null_instance_accepted = x "552774
changing
instance = if_badi.
Even this BADI contains around 10 methods init which one i supposed to use .....
IOnemore point when i placed a breakpoint in the above mentioned Method it is triggering In PBO of MIGO tcode.
thanks again
Message was edited by:
shishupalreddy ramreddy
‎2006 Dec 29 10:03 AM
hi sharath ,
thanks a lot for the answers ..
but i used the BADI
MB_MIGO_BADI and POST_DOCUMENT method and the requirement is done ..
awarding the points ...
thanks