How to raise an exception in Function Module?

Answer Posted / prashant tiwari

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.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between Blocked ALV and interactive ALV?

1853


While sorting field groups we cannot use more than one key field. State true or false. : abap modularization

577


i have cleared my technical round and manager round in cts but they told me u will get a call with in couple of days now i dont know about my status

8486


What work you have done in HR module

894


What is meant by hotspots?

604






Why do we use logical blocks in abap program?

1429


What are the domains and data element?

548


How to write a code in tab control? : abap bdc

620


The max number of calling modes stacked at one time is?

578


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1721


what is the transaction transaction for setting parameters rdisp/buffermode

3556


How to do find it?

551


What are the classifications of the sap abap data classes?

597


What are the kinds of foreign key fields?

523


stock transfer from one plant to another plant ? i want the total description.

1562