How to read exception text of a FM
I have a custom Function Module which has 3 different exceptions in it's exceptions section. I need to get the text for the raised exception in the caller program, how to do that ?
here is a sample call to the FM:
call function 'ZGET_YEAR'
pernr = l_pernr
year = l_year
emp_not_valid = 1
year_not_found = 2
others = 3.
Now, if the emp_not_valid is raised by the FM then I need to get the text stored in that exception.
Appreciate any inputs on it. Thank you.
Naimesh Patel replied
At first point of time, I thought you are accustomed with the Exception Handling and you want to read the text of the Exception to avoid givig the speicifc message. So, I have suggested the Function Module Tables which stores the information.
Anyways, I have created a Small Tutorial on : [Function Module Exception Handling|http://help-abap.blogspot.com/2008/10/function-module-exception-handling.html] on my professional blog.