Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pankaj-Kumar
Participant
0 Kudos

When we implement the validation for some fields for MM01/MM02 with the help of BADI BADI_MATERIAL_CHECK, and throw error message then screen gets freeze and we are unable to modify and give the correct value. Then, how to avoid such scenario.

This scenario can be avoided by adding the exception 'APPLICATION_ERROR' while throwing the message like below.

MESSAGE 'message_text' TYPE  'E' RAISING APPLICATION_ERROR.

This helps to avoid the screen freeze.

Thank you!

1 Comment
Sandra_Rossi
Active Contributor
0 Kudos

I guess your post only concerns the method CHECK_DATA of BAdI BADI_MATERIAL_CHECK (or possibly the less used method CHECK_DATA_RETAIL).

To avoid this situation, you should always read the BAdI documentation before implementing.

"One exception is defined for the error situations you define yourself: APPLICATION_ERROR. Using term MESSAGE .. RAISING APPLICATION_ERROR, you can ensure that the current (logical) transaction is terminates and your message appears in the log."

Note that for such a short recommendation, you may post both the question and the answer (the way it's done by SAP Support from time to time, e.g. Solved: Dynamic Date Selection - SM13 - SAP Community).

Labels in this area