Application Development 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: 

Writing come message to the job log for program run at background

Former Member
0 Kudos

Hi,

How can I write some messages to the log for my program which is run in background?

THanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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?

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

0 Kudos

>

> 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

Former Member
0 Kudos

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