Application Development and Automation 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: 
Read only

BADI

Former Member
0 Likes
661

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

3 REPLIES 3
Read only

Former Member
0 Likes
608

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

Read only

Former Member
0 Likes
608

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

Read only

Former Member
0 Likes
608

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