How to raise an exception in Function Module?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shankar
1-System_Failure
2-Communication-failure
Thru this we can raise an exception..
Is This Answer Correct ? | 2 Yes | 14 No |
How to debug an Idoc at runtime?
What are the events used in abap in the order of execution?
What are system variable in abap?
Explain the concept of clusters in payroll
what is the significance of project, subproject and object in lsmw?
How would you set the formatting options statically and dynamically within a report?
I have more than one layout in a form, would You handle?
what is the difference between a table and template in Smartforms?
4 Answers HCL, Tech Mahindra, Wipro,
How to change the development class of any object?
How would you design a BDC (session method ) in which session will get executed itself. user do not need to go to SM35.
What are the differences between table controls and step loops?
Types of BDC?