‎2006 Sep 19 11:02 AM
Hi,
What are the exceptions in function module.
Thanks in advance
‎2006 Sep 19 11:05 AM
Hi Mallela,
They are the errors that can be generated when the function module is processed. they can be handled by checking the sy-subrc values after calling the function module
Regards,
Vidya.
‎2006 Sep 19 11:05 AM
Hi Mallela,
They are the errors that can be generated when the function module is processed. they can be handled by checking the sy-subrc values after calling the function module
Regards,
Vidya.
‎2006 Sep 19 11:05 AM
if you get an error, instead of making the program going to dump,we will catch them and put them as EXCEPTIONS.
or
if you get any unaccepted conditions,you will through them as Exceptions.
just check any standard function modules
like,
GUI_DOWNLOAD,or GUI_UPLOAD to know how to define the exceptions and how to call them.
regards
srikanth
‎2006 Sep 19 11:05 AM
Exceptions in function modules or classes denote those situations where the function module or class has failed to perform the task for which it is intended.In such cases we fill the exception tab in function or class with all possible exception cases that can be anticipated.
These exceptions can be caught in the program by using the system variable sy-subrc.
if sy-subrc eq 0.
*success.
else.
*exception.
endif.
‎2006 Sep 19 11:05 AM
HI,
Exceptions are used to return the error which happens in function module to the calling program.
You can't show error messages directly from Function modules. So when there are some error occurs in function module it raises the desired exception. and this exception number is passed back to calling program. in this way calling program can trace out the error happens in function module.
REgards,
‎2006 Sep 19 11:06 AM
Exceptions are un foreseen situations in the flow of the Function module execution.
YOu cannot raise error messages in a function module but the calling program should know that something unexpected has happened.
In such situations, exceptions are raised.
eg:
raise exception no_data.
These exceptions can be caught after the function module call using the sy-subrc value.
Regards,
Ravi
‎2006 Sep 19 11:06 AM
These are the errors that functon module developer have handled in the function module.
Errors/ Exceptions can raise due to some conditions in function module, now what you can do is define your own exceptions. and when ever that perticulat error condition is faced simply raise the appropriate error/exception condition.
This is a very useful method to distinguish between different type of errors generater during function calls.
‎2006 Sep 19 11:13 AM
Hi,
Exceptions in FM are used to handle errors in
program like divide error.
Regards
amole