ARITHMETIC_ERRORS set sy-subrc to 4, all other catchable
runtime errors set sy-subrc to 8. The division by 0 causes the
catchable runtime error COMPUTE_INT_ZERODIVIDE , which is
contained in the exception group ARITHMETIC_ERRORS . In this case,
sy-subrc is also set to 4.
DATA: result TYPE i,
number TYPE i.
CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 4
OTHERS = 8.
...
result = 1 / number.
...
ENDCATCH.
IF sy-subrc <(><<)>> 0.
...
ENDIF.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved