Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EXCEPTIONS

Former Member
0 Likes
549

what is the use of exceptions in function module.

4 REPLIES 4
Read only

Former Member
0 Likes
529

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

Read only

Former Member
0 Likes
529

Hi,

Check this thread

Regards,

Satish

Read only

Former Member
0 Likes
529

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

Read only

Former Member
0 Likes
529

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.