‎2007 Jul 16 2:23 PM
HI,
I CREATED ON BADI FOR BADI_MATERIAL_CHECK WHICH CHECK UNIT SAME OR CHANGED . IF IT IS CHANGED THEN IT WILL GIVE SOME MESSAGE . I HAVE GIVEN CODING FOR IT.
<b> method IF_EX_BADI_MATERIAL_CHECK~CHECK_CHANGE_MARA_MEINS.
IF NEW_MEINS NE OLD_MEINS .
MESSAGE 'IT IS NOT POSSIBLE CHANGE THE UNIT '.
ENDIF.
endmethod</b>
WHEN I GO TO MM02 AND I AM ENTERING ALLREADY EXIT MATERIAL .BUT IT IS NOT ALLOW TO CHANGE THE MATERIAL .HOW CAN GET OUTPUT
THANK YOU
ASHOK KUMAR
‎2007 Jul 16 2:30 PM
Hi,
you can use FM POPUP_DISPLAY_MESSAGE instead.
...
CALL FUNCTION 'POPUP_DISPLAY_MESSAGE'
EXPORTING
TITEL = 'Error Message'
MSGID = 'BD'
MSGTY = 'E'
MSGNO = '899'
MSGV1 = 'Data input error'.
IF SY-UCOMM = 'OKAY'. *Continue button
...
ELSEIF SY-UCOMM = 'RW'. *Cancel button
...
ELSE.
...
ENDIF.
<b>Reward points</b>
Regards
‎2007 Jul 16 2:45 PM
May be you have to fill the attribute ERROR_TEXT of the method
CHANGE_MARA_MEINS.
I thinks the system manage the error text if there is.
bye
enzo
‎2007 Jul 16 3:22 PM
Hi Ashok,
for this badi - u need to activate the zbadi implementation and then go to method CHECK_DATA put some break point and check whether it goes to debugging pt and remove the breakpoint - activate it, then go this method CHECK_CHANGE_MARA_MEINS - write the logic and then check it should work
i have checked this badi its working kindly revert back if any issues
IF NEW_MEINS NE OLD_MEINS .
CALL METHOD c_oi_errors=>raise_message
EXPORTING type = 'E'.
ENDIF.
<b>Reward pts if found usefull :)</b>
Regards
Sathish