‎2009 May 06 10:19 AM
Hello People,
I want to know best practices regarding implementation of batch/background programs.
My question is:
1. Do you use any error mechanism if sy-subrc fails e.g. en-queue function module fails and return sy-subrc = '1' ... in that case do you just terminate your program or use some error mechanism and then terminate it (I want to know industry best practice).
2. Also which is the best error mechanism available (easy and performance oriented)
i.e. app. log, bpem or simple spool message etc.
Any documentation/url would be of great help.
-
Kind Regards,
Nikhil J.
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on May 6, 2009 9:30 AM
‎2009 May 06 1:33 PM
Hi
First some error mechanism and then termination is prefferable. Application error is generally used one. if specifically spool message required means then spool message will be used.
Thanks,
Suma.
‎2009 May 06 1:33 PM
Hi
First some error mechanism and then termination is prefferable. Application error is generally used one. if specifically spool message required means then spool message will be used.
Thanks,
Suma.
‎2009 May 06 2:00 PM
Hi,
You use some error mechanism and terminate the program.
If the error is a critical one you can send an error by e-mail to specified users for prompt response.
Regards
Krishna
‎2009 May 06 2:16 PM
Simply giving the error message is enough.
An error message will terminate the backgroud job, rollback any database update and you will be abe to see the job in cancelled state.
However, you program may require any custom error handling procedure..e.g. sending mail , notifying user or starting a work flow.