I have created onc z exception class ..i have few doubts regarding raising exceptions ...
my code is like this..
PARAMETERS: myamount TYPE i.
DATA: mysavings TYPE i VALUE 5000,
plannedbalance TYPE i,
ex TYPE REF TO ZCX_DEMO_EXCEPTION_TEST,
mes TYPE string.
RAISE EXCEPTION TYPE ZCX_DEMO_EXCEPTION_TEST EXPORTING amnt = myamount
saving = mysavings.
plannedbalance = mysavings - myamount.
IF plannedbalance < 0.
CATCH zCX_DEMO_EXCEPTION_TEST INTO ex.
mes = ex->get_text( ).
MESSAGE mes TYPE 'I'.
...........my doubt is why we cant abel to cach the exception ..even we i catched them in TRY and entry.....for above code system is giving warning message...
but if we keep raise and catch statement between try and entry ...then no issues....it is working fine.
Please calrify me..
<removed by moderator>
Edited by: Thomas Zloch on Dec 9, 2011 8:36 PM