‎2008 Mar 14 1:30 PM
how do i use catch end catch for a function module to catch the system exceptions when a program dumps?
‎2008 Mar 14 1:33 PM
hi ,
DATA: result TYPE i,
number TYPE i.
CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 4
OTHERS = 8.
...
result = 1 / number.
...
ENDCATCH.
IF sy-subrc <> 0.
...
ENDIF.
regards,
venkat.
‎2008 Mar 14 1:36 PM
Hi but it says unable to interpret SYSTEM-EXCEPTIONS, i have gone through this bit of code in the F1 Documentation Thank you
‎2008 Mar 14 1:50 PM
The sample code is working fine in our system here. So, two possibilities exist. (1)Your system is on older version of SAP. (2) You have syntax error in your code.
If CATCH is passing the syntax check, but not SYSTEM-EXCEPTIONS, then I suspect the problem is in your code.