Eventhough success messages are not disturbing flow of program, we know that they can also be avoided with a mystery way. I don’t know why SAP has hidden this exception but it is a very practical solution. I intentionally write a post named hidden exception choice for handling error messages in function modules . However this hidden exception is not only covering error messages but also success and information messages. That’s why i want to remind this subject.
You can use this facility by adding an extra exception case for your function module like below.
call function 'ZYA_ERROR_MESSAGE'
general_error = 1
application_error = 2
others = 3
error_message = 4.