Google Search - Blog...........

ABAP - OOPS : Propagation Of Class-Based Exceptions In Procedures To The Caller.

REPORT YSUBOOPS17 .

start-of-selection.

try.
perform sub_check_no using 5 .
catch cx_sy_zerodivide.
write:/5 'Hello' .
endtry.

FORM sub_check_no USING P_P_NO
RAISING CX_SY_ZERODIVIDE.
p_p_no = p_p_no / 0 .

ENDFORM. " sub_check_no


Output Hello

No comments:

Post a Comment