Copyright 2022 - BV TallVision IT

The Business Application Log is used for the somewhat more serious logging. When the steps a report executes are error-prone and the quality of the result (e.g. for an interface) is important, errors on background job logs are not the answer. Inbound Idoc processing also uses the Business Application log, when too many errors are listed. But there is no reason you yourself should not use it. Save the log, only if it contains errors and send this log to an email receiver - just to inform him/her something has gone wrong.

The selection screen


Schedule your background job and include this report (with variant) as the final step of the job. The report will find the Business Application Log (transaction SLG1) as specified (looking back e.g. half an hour) and create an email with attachment. The attachment will contain the job log information. An example of attachment output:

as an attachment with the name SAPLOG10-06-2015 ~16_28.txt

Subject and body

Every email has a subject line as well as actual content lines. The subject line can be filled in on the selection screen, or a default subject will read: "Message from SAP sss client nnn" (specifying the system id and the client number).

The body of the email can be composed out of multiple lines and is read from the text pool: use SO10 to create your text and specify the text name in the report selection screen. A body text is not mandatory. At the end of the email, the text line "This email was created in SAP sss client nnn", just to automatically clarify the origin of the email.

The following variables can be added/set in the email body or subject:

  • {logcount} - Number of logs that were selected, the contents of the latest one is used to compose the email
  • {errorcount} - Number of errors in the application log
  • {system} System ID (SY-SYSID)
  • {client} Client (SY-MANDT)
  • {date} Date of the application log
  • {time} Time of the application log
  • {object} Application log object
  • {subobject} Application log subobject
  • {external} Application log external key (usually the report name)
  • {jobstep} Report name (to track down where the email was created from)