REPORT YSUBCLASS_EXCEPTION_3.
START-OF-SELECTION.
DATA : num type i value 5 .
TRY.
TRY.
NUM = NUM / 0.
CATCH cx_sy_ZERODIVIDE .
WRITE:/5 'Division by 0 caught'.
NUM = 'SUBHENDU'.
ENDTRY.
CATCH cx_sy_conversion_no_number.
WRITE:/5 'Cannot be converted to number'.
ENDTRY.
Output:
Division by 0 caught
Cannot be converted to number
Here you can find examples and sample programs related to ABAP Report Programs, ALV Grid/List Programs, BDC, HR ABAP, Function Modules, BAPIs, BADIs, Smartforms, SapScripts, etc.
Google Search - Blog...........
Showing posts with label nested try catch sample code in abap. Show all posts
Showing posts with label nested try catch sample code in abap. Show all posts
Subscribe to:
Posts (Atom)