‎2007 Apr 27 5:40 AM
‎2007 Apr 27 5:45 AM
Hi Vinay,
You can't delete the ABAP Runtime errors. But you can catch the errors using catch exception Statement.
For Example,
Class-based exceptions are handled in the following control structure:
TRY.
... " TRY block (application coding)
CATCH cx_... cx_... ...
... " CATCH block (exception handler)
CATCH cx_... cx_... ...
... " CATCH block (exception handler)
...
CLEANUP.
... " CLEANUP block (cleanup context)
ENDTRY.
Try This Sample Code,
*--
*DATA : VALUE1 TYPE I.
*
*VALUE1 = 1 / 0. -
>>>>>> IT MAKES RUN TIME ERROR.
*
*WRITE : VALUE1.
*-EXAMPLE FOR HOW TO CATCH THE ARITHMETIC ERROR AT THE RUN TIME USING SUBRC----
DATA : VALUE1 TYPE I.
CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
VALUE1 = 1 / 0.
WRITE : VALUE1.
ENDCATCH.
IF SY-SUBRC = 1.
WRITE : ' IT MAKES ERROR'.
ELSE.
WRITE : VALUE1.
ENDIF.
Thanks,
Reward If Helpful.
‎2007 Apr 27 5:45 AM
Hi Vinay,
You can't delete the ABAP Runtime errors. But you can catch the errors using catch exception Statement.
For Example,
Class-based exceptions are handled in the following control structure:
TRY.
... " TRY block (application coding)
CATCH cx_... cx_... ...
... " CATCH block (exception handler)
CATCH cx_... cx_... ...
... " CATCH block (exception handler)
...
CLEANUP.
... " CLEANUP block (cleanup context)
ENDTRY.
Try This Sample Code,
*--
*DATA : VALUE1 TYPE I.
*
*VALUE1 = 1 / 0. -
>>>>>> IT MAKES RUN TIME ERROR.
*
*WRITE : VALUE1.
*-EXAMPLE FOR HOW TO CATCH THE ARITHMETIC ERROR AT THE RUN TIME USING SUBRC----
DATA : VALUE1 TYPE I.
CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
VALUE1 = 1 / 0.
WRITE : VALUE1.
ENDCATCH.
IF SY-SUBRC = 1.
WRITE : ' IT MAKES ERROR'.
ELSE.
WRITE : VALUE1.
ENDIF.
Thanks,
Reward If Helpful.
‎2007 Apr 27 5:46 AM
hi
good
you cant delete the abap runtime errors ,yes while activating you can select the activate anyway button to activate the program and execute it.
thanks
mrutyun^
‎2007 Apr 27 5:48 AM
hi,
u cant delete the runtime errors only while activationg u can see them n changwe the errors but u cant delete them,