‎2007 Jun 04 9:57 AM
How to handle exceptions in function module. and why? pls clarify my doubt.
I need a program for tree structure using some db tables.
can any one clarify that if i excute a report (in classical or interctv) one field or record has to flashed.
‎2007 Jun 04 11:50 AM
HI
Check if the following is helpful....
There are two ABAP statements for raising exceptions. They can only be used in function modules:
RAISE <except>.
and
MESSAGE..... RAISING <except>.
The effect of these statements depends on whether the calling program handles the exception or not. If the name <except> of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program.
If the calling program does not handle the exception
The RAISE statement terminates the program and switches to debugging mode.
The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type.
If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/search/highlightContent.jsp
<b>Please reward if useful...</b>
Regards
Dinesh
‎2007 Jun 04 11:50 AM
HI
Check if the following is helpful....
There are two ABAP statements for raising exceptions. They can only be used in function modules:
RAISE <except>.
and
MESSAGE..... RAISING <except>.
The effect of these statements depends on whether the calling program handles the exception or not. If the name <except> of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program.
If the calling program does not handle the exception
The RAISE statement terminates the program and switches to debugging mode.
The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type.
If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/search/highlightContent.jsp
<b>Please reward if useful...</b>
Regards
Dinesh