2014 Jun 10 9:13 AM
Dear Abappers,
I am facing some issue . I have written this code.
try.
MODIFY dt_tabcst INDEX 0.
CATCH cx_root.
EXIT.
ENDTRY.
but unable to catch the exception. I get screen dump . table_invalid_index runtime error. How can i catch this error.?
Regards
Aneel
2014 Jun 10 9:39 AM
Hi Aneel,
TABLE_INVALID_INDEX is uncatchable runtime error.
To verify that an exception is catchable, go to ST22 and see column Exception.
If exception is filled is catchable, if not is uncatchable.
Regards,
Angelo.
2014 Jun 10 9:15 AM
2014 Jun 10 9:19 AM
you need to declare one variable to catch exception.
Please follow following snap of code to catch the exception.
suppose we are dividing two number. by mistake i divided nmber by 0.
that time it will work.
2014 Jun 10 9:24 AM
Index should not be zero. Please check. Hope the modify statement written inside the loop and Table dt_tabcst is defined with header line.
Just put break point on Modify statement and check system variables SY-MSGID / SY-MSGNO to get the details of error.
BR,
Prakash
2014 Jun 10 9:31 AM
Dear All,
i know that error is due to index 0. But it should catch the exception . but it does not catch.
2014 Jun 10 9:38 AM
try to handle like me how i handled.
you will get a solution.
2014 Jun 10 9:39 AM
Hi Aneel,
TABLE_INVALID_INDEX is uncatchable runtime error.
To verify that an exception is catchable, go to ST22 and see column Exception.
If exception is filled is catchable, if not is uncatchable.
Regards,
Angelo.
2014 Jun 10 9:50 AM