‎2008 Apr 22 2:02 PM
‎2008 Apr 22 2:07 PM
To enable error situations in procedures to be handled by the caller, exceptions have been defined in the interface of function modules and methods. For global procedures, the exceptions were defined in the ABAP Workbench. For local methods, they were defined with the EXCEPTIONS addition of the METHODS statement. Exceptions defined in this way can be raised within the procedure with the RAISE statements and with the RAISING addition of the MESSAGE statement.
creating FM using exceptions :
http://help.sap.com/saphelp_nw04/helpdata/en/9e/d58167116711d5b2f40050dadfb92b/frameset.htm
‎2008 Apr 22 2:07 PM
‎2008 Apr 22 2:12 PM
hi sekhar,
exeptions are to avoid run time errors.
and to avoid short-dump..
for exapmle suppose some req data missing are enter some
wrong entry there is no nessasity to go short dump and avoid those situations and catch the errors we exceptions.
regards,
chandu.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 22, 2008 3:05 PM
‎2008 Apr 22 2:18 PM
Hi,
Exception : It is a Unexpected condition that occur in a program.
so Exceptions are used to avoid Short - Dumps, Runtime Errors in a Program.
Raising Exceptions
There are two ABAP statements for raising exceptions. They can only be used in function modules:
RAISE except.
und
MESSAGE.....RAISING except.