‎2007 Nov 15 10:39 AM
HI,
I have called a function module and how can i know that an exception has raised.
‎2007 Nov 15 10:41 AM
‎2007 Nov 15 10:41 AM
Hi Karthick,
SY-SUBRC will store corresponding value....
by using CASE or IF...ENDIF..you can find actual exception...
‎2007 Nov 15 10:42 AM
‎2007 Nov 15 10:47 AM
Hi Karthick,
If you want know whether exception raised or not, write if condition just after your FM call ends.
If Sy-subrc <> 0.
Write : \ Sy-subrc , ' FOUND'.
endif.
<b>
Kindly reward if useful
Rohit G</b>
‎2007 Nov 15 10:48 AM
Don't forget you'll need to map each of the exceptions to a numver for sy-subrc to have any meaning.
E.g.
CALL FUNCTION example
IMPORTING
something = something
EXCEPTIONS
FAILED = 1
ALMOST_WORKED = 2
VERY_CLOSE = 3
and so on.
Regards,
Nick