Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Event/Processing while program termination

Former Member
0 Likes
530

Hi Experts

Is there any even or processing which will be called while abnormal termination of a program, say while unexpected short dump or session termination

To be very specefic, I want some clean up code to be executed if the program is terminated unexpectedly.

Note : This does not include cases of termination through raise of custom/system EXCEPTIONS. I am interesed in case

1 ACCEPTED SOLUTION
3 REPLIES 3
Read only

Former Member
0 Likes
488

Hi mukundan,

The best way is to check sy-subrc at every stage of the program and have all the messages for the sy-subrc check failure.

I don't think there is something which will 100% fit to your requirement.

Regards,

Atish

Read only

0 Likes
488

Hi Peram

Thanks for the suggestion. The link given by you contains info about ASSERT command and few other commands. The ASSERT command can give some amount of help to my requirement. But cant use them due few constraints.

Hi All

To be precise, i would like to know if there is any event/processing that would be called on termination of the program. say, just like "LOAD-OF-PROGRAM" which is called when a program is loaded(called), similarly is there any processing block that will be called at program termination.

Or I would like to know if there are any ways to keep recording logs from the program continuously, so that even in case of unexpected program termination, user can resort to this log for details of processing that has happened.

Note: I tries to write these log in SPOOL, but the problem lies in the fact that, if SPOOL is not closed formally then data written in to it cannot be retrieved.

Thanks

Mukundh