08-20-2007 1:42 PM
There is a function module the program in which exceptions are handled. When the program is ran as a background job and when there is a exception arises does the background job fails or the exception gets handled ??? Pls help me out.....
08-20-2007 1:45 PM
If the exception is being handled by the caller, meaning that the exception is listed in the EXCEPTIONS section of the funciton call, then the program will handle it gracefully and continue processing, if it is not in this section of the funciton call, and it is raised inside the funciton module, it will issue an ABAP dump and end. This is true for foreground processing as well as background processing.
Regards,
Rich Heilman
08-20-2007 1:44 PM
if you have specify :
EXCEPTIONS
OTHERS = ..
you program will not stop.
Fred
08-20-2007 1:45 PM
If the exception is being handled by the caller, meaning that the exception is listed in the EXCEPTIONS section of the funciton call, then the program will handle it gracefully and continue processing, if it is not in this section of the funciton call, and it is raised inside the funciton module, it will issue an ABAP dump and end. This is true for foreground processing as well as background processing.
Regards,
Rich Heilman
08-20-2007 1:47 PM
it raises an exception you can catch it.
cx_root is the root class for exceptions.
DATA: ex TYPE REF TO CX_ROOT.
TRY.
call fm.
...
CATCH cx_root INTO ex.
ENDTRY.
message = cx_root->get_text( ).
this way your program will not stop..
regards,
Aparna