XS Jobs in SAP Tip: How to Send an Email Alert When an XS Job Fails

XS Jobs in SAP Tip: How to Send an Email Alert When an XS Job Fails featured image

For various reasons, XS jobs may fail in an SAP system. A Basis/System admin should be notified when this happens. I have not seen a standard out of the box functionality from SAP to send email alerts in this situation. It’s very painful to manually log into the XS server every day to check for any failed jobs. In this blog, I’ll show you a step-by-step guide on a quick and easy way to send an email alert when an XS job fails.

SAP Tip: Steps for sending email alerts when XS jobs fail

A Failed XS Job looks like this:

XS jobs

And the Error message is:

  1. Logon to HANA Studio
  2. Ask Security to give access to _SYS_XS Schema
  3. Create a Calculation View:
    SAP Tip XS jobs fail
    find the ‘Table’  JOB_LOG from _SYS_XS Schema and put a filter on ‘ERROR’ Status as shown below

In my scenario, I am only taking jobs that failed ‘today’. You can change this to whatever date you want.

XS Jobs

Data Preview of the calculation view looks like this:

  1. You can either call this calculation view in a ABAP program. In my scenario, I am creating and scheduling a WEBI Report.
  2. Log on to Business Objects BI Launch Pad and create a WEBI report on top of this calculation view.

XS jobs

WEBI Report output:

More Tips on Running SAP

Stick around our blog, and in the coming weeks I’ll have more tips on how to run SAP, including how to extend a CDS view and how to find an underlying Bex Query.

If you need more help with your SAP system or implementation, contact us.