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: 

How to customize Batch Job Log for a Batch job??

Former Member
0 Kudos

I have a batch job program which is executed on daily basis on production. In this program, many standard BAPIs are callled for creation and modification of a Production Order.

On production this batch job is creating a very large job log containing all kinds of messages. User wants only the error messages to be there in the batch job log.

The messages in the job log are the messages coming from BAPIs.

How to modify this batch job log as the job log is synchronously created while the program is running in background?

4 REPLIES 4

Former Member
0 Kudos

Hi,

As per your requierment if ALV grid is one way but which is having some implications in Back ground job. Another way is to write the Z program where read the JOB LOG( As it is not stored in Table) details in the background of your job(PO program output) by using the funciton module 'BP_JOBLOG_READ' .

Here jobcount, joblog and jobname fields in the function module, you need to pass the value to get the job log details. So jobcount, Job log value fetch from TBTCO table by giving the JOB name (as Program name of create the po or modify the PO). once you get the field values of jobcount and joblog pass these values in function module and get the job log details as how it is appearing in SM37. Now you will get Job log details in your internal table. you can delete or show only the Error messages in your output as your client requirement.

when ever PO program is running then this z program (which you are going to write) also should run to get the JOB log and display it as per your requirement. Ask your client people to see this report as output

This is the option I got it, use them if it helps you......

Thanks and Regards,

R.P.R Kumaar

brad_bohn
Active Contributor
0 Kudos

How to modify this batch job log as the job log is synchronously created while the program is running in background?

You can't. Messages issued in BAPI processing in the background are also issued to the job log. However, I haven't worked with PP in 10 years - I don't remember if there are configurable message classes in PP. You may want to check the BAPI code or the IMG for an option. You may be able to config suppression of messages in certain message classes.

Former Member
0 Kudos

Normally all the message raised through BAPIs are stored in the job log thats the standard behaviour of the SAP logs, if you want you can create a customized report to read the job logs and display selected information messages to the users.

There are standard FMs which can be used to read the Log messages and then these can be filtered easily in an ABAP program.

Former Member
0 Kudos

Hi All,

I have already tried the below options:

1) Any changes done to the standard BAPI's - This is not at all a feasible solution and it wont work as well

2) Configurations through IMG - This is also not possible

3) OSS Notes - There are no OSS notes available for the same

The purpose of this requirement is as below:

"Basis has warned that the log generation for the resp. program has caused overall performance issues in production in the past if the log is large enough. They requested we look into options to reduce potential log size."

So even by creating a 'z' program to read and display the log will not resolve the issue, as the job log is already generated once and is there in the batch job. So the original issue remains the same.

Please provide me with any idea / possibility / solution to resolve the issue.

Thanks and Regards,

Tejaswini

Edited by: Tejaswini Chintawar on May 30, 2011 7:50 AM

Edited by: Tejaswini Chintawar on May 30, 2011 7:50 AM

Edited by: Tejaswini Chintawar on May 30, 2011 7:51 AM