03-11-2010 9:37 AM
Hi,
How can I write some messages to the log for my program which is run in background?
THanks in advance.
03-11-2010 10:20 AM
Hi Alvin,
You can write messages for your program and see them in SLG1 transaction.
To write this messages in your system has SBAL* example programs . For example SBAL_DEMO_01.
The programs and modude functions to write the log are in SZAL package.
I hope it is usefull for you.
Best Regards,
Daniel Zapardiel
03-11-2010 10:20 AM
Hi Alvin,
You can write messages for your program and see them in SLG1 transaction.
To write this messages in your system has SBAL* example programs . For example SBAL_DEMO_01.
The programs and modude functions to write the log are in SZAL package.
I hope it is usefull for you.
Best Regards,
Daniel Zapardiel
03-11-2010 10:26 AM
Hello Lim,
Every message thrown in the program is displayed in the Job Log when the program is run in background mode. Why do you need to create a separate log ?
BR,
Suhas
03-11-2010 10:30 AM
Hi,
yes, you can write messages to log, but you have to store the log - you can not display it to the user.
Regards,
--
Przemysław
03-11-2010 10:52 AM
My list of messages are store in an internal table, not display using 'MESSAGE' statement. So, I need to display these messages into the job log. If the job log is stored, how do I do that and how can the user can see?
03-11-2010 10:54 AM
Hi,
write all messages to list using WRITE statement - it will be visible in SM37 after program execution.
You can also use BAL_LOG_MSG_ADD and BAL_DB_SAVE.
Regards,
--
Przemysław
Edited by: Przemyslaw Prominski on Mar 11, 2010 11:57 AM
03-11-2010 11:05 AM
>
> My list of messages are store in an internal table, not display using 'MESSAGE' statement. So, I need to display these messages into the job log. If the job log is stored, how do I do that and how can the user can see?
As suggested if you use
MESSAGES <msg_details> INTO v_text. WRITE v_text.
. The log will be written to the job spool & not the job log. If you want to write the error messages to the spool you can take this approach.
Else you can create an application log with the relevant messages.
BR,
Suhas
03-11-2010 11:01 AM
Hi Alvin,
there is nothing to do .
Just write your error messages in the program andexecute the program in background using tcode SM37.
If you are maintaing variant in custome table then Use SM36 to schedule in background.
what ever error messages u got thet will appear in JOBLOG.
Regards,
Pravin