Code:
DATA: res TYPE char10.
PARAMETERS: p1 TYPE char10,
p2 TYPE char10.
TRY.
res = p1 / p2.
WRITE:/ res.
CATCH cx_sy_zerodivide.
WRITE: 'cannot divide by zero'.
ENDTRY.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us. We will reply you as soon as possible.
Post a Comment