SAP: Job Intercept Monitor

Disclaimer

This download is designed as a template to be adapted to your environment. In some cases, templates will need to be changed to work with your current Universal Automation Center (UAC) setup. This download is free to use. However, the download is not supported, and no warranty is provided by Stonebranch for this document and the related download.  The use of this document and the related download is at your own risk. Before using this download in a production system, please perform testing. 

Stonebranch assumes no liability for any issues caused by the performance of this download.

Request Support:

Stonebranch offers paid support, by request, for select Universal Tasks. Paid support provides installation and ongoing technical support. Universal Tasks that are eligible for paid support will be noted as “support eligible” within the Universal Task listing page. To learn more, please contact Stonebranch.


Introduction

The SAP Job Intercept Monitor checks, in a configurable interval, whether there are jobs with the status "intercepted" in SAP. As soon as one or more jobs with the status "intercepted" are found, the jobs are automatically started by the universal controller.

Universal Task SAP Job Intercept Monitor Key Features

Some details about the SAP Job Intercept Monitor:

  • Automatically identifies Intercepted Jobs in SAP and launches them from Universal Controller

  • Controls the number of intercepted Jobs which are started in parallel to avoid SAP system overload

  • All Intercepted Jobs are available in the Activity and History log of Universal Controller

  • All SAP Log files are available from Universal Controller in the same way as any standard SAP Job

  • Create, activate, deactivate, display, delete and set criteria profiles via a Universal Controller SAP Task

Software Requirements

Software Requirements for Universal Agent

  • Universal Agent for Linux or Windows Version 7.0.0.0 or later is required.

  • Universal Agent needs to be installed with python option (--python yes).

Software Requirements for Universal Controller

  • Universal Controller 7.0.0.0 or later is required.

Software Requirements for the Application to be Scheduled

SAP Credentials (Username and Password) to connect via the XBP-RFC Interface to SAP ERP System is required.

Import the SAP Job Intercept Monitor Universal Template

To use the SAP Job Intercept Monitor Template, you first must perform the following steps:

  1. This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true. For more information about Resolvable Credentials, click here.

  2. Download the provided ZIP file.

  3. In the Universal Controller UI, select Administration >Configuration > Universal Templates to display the current list of Universal Templates.

  4. Click Import Template.

  5. Select the template ZIP file and import.

When the template has been imported successfully, the Universal Template will appear on the list. Refresh your Navigation Tree to see these tasks in the Automation Center Menu.

Configure SAP Job Intercept Monitor Universal Tasks

For SAP Job Intercept Monitor, create a new task and enter the task-specific Details that were created in the Universal Template.

SAP Job Intercept Monitor Task Field Descriptions 

Fill out the Universal Task for the SAP Job Intercept Monitor

Field

Description

Agent

Linux or Windows Universal Agent to run the USAP commands

Agent Cluster

Optional Agent Cluster for load balancing

SAP Connection Type

[ Application Server Connection, SAPNWRFC.INI Connection ]

The Universal Task support SAP Application Server and SAPNWRFC.INI Destination connections.

Application Server Connection:

  • Client

  • SAP SysNr

  • SAP ASHOST

SAPNWRFC.INI Connection:

  • SAP Client

  • Destination

The sapnwrfc.ini needs to be in the home directory of the user executing the task. If no user credentials are provided, this is:

  • Linux: /opt/universal/uagsrv

  • Windows: C:\Program Files\Universal\UAGSrv

SAP ASHOST

SAP Application to connect to.

This field is visible only if SAP Connection Type = “Application Server Connection”

SAP CLIENT

SAP Client (3 digits); for example, 100

The Imported calendar will have the SID as prefix

Imported Calendar Name:

<SID>_<SAP CLIENT>_<SAP CALENDAR ID>

SAP SysNr

SAP System Number ( 2 digits ) ; for example, 00

This field is visible only if SAP Connection Type = “Application Server Connection

SAP Destination

SAP Destination in the nwrfc.ini.

This field is visible only if SAP Connection Type = “NRFW.ini Connection

Language

SAP language e.g., en

USAP Dir

Directory where the USAP binary is stored

Linux: /opt/universal/usap/bin

Windows: C:\Program Files\Universal\USap\bin

Universal Controller URL

Universal Controller URL.

For example, https://192.168.88.40/uc

Poll Interval

[10s | 60s |180s]

Interval in seconds the monitor checks in SAP, if new Jobs in status intercepted exists.

Default Value is: 60s

Virtual Resource Name

Name of the Virtual Resource, which controls the maximum number of Intercepted Jobs, which are started in parallel by the Universal Controller.

Default Value is: SAPINTERCEPTVR

Virtual Resource Limit

Controls the maximum number of Intercepted Jobs, which are started in parallel by Universal Controller.

; for example, 50 means that a maximum of 50 Intercepted Jobs are started in parallel.

This Parameter is just to control that the SAP system does not get overloaded.

Default Value is: 50

SAP Task Name

The started Jobs will have the default naming: SAP_IntCpt#${JOBNAME}#${JOBCOUNT}, where:

  • JOBNAME is the name of the Intercepted Job in SAP and

  • JOBCOUNT the Jobcount ID of the Intercepted Job in SAP.

Default Value is: SAP_IntCpt#${JOBNAME}#${JOBCOUNT}

; for example,

SAP_IntCpt#BASIS_04#12555600

USAP loglevel

Log level of the Universal Connector for SAP

trace | audit | info | warn | error

rfc_logon_retry_interval in s

Interval in seconds between a new logon attempt to SAP.

Per default 10 retries will be performed; for example, 120s means every 120s a new logon attempt to SAP is performed. If after 10 retries no logon to SAP was possible, the Task fails.

Loglevel

Universal Task logging settings

[DEBUG | INFO| WARNING | ERROR | CRITICAL]


Example: SAP Job Intercept Monitor Task

Let’s assume your SAP System has intercepted the Job: SAP_STONE_JOB_04

The below configured SAP Job Intercept Monitor Task polls the SAP system every 10s for intercepted jobs. If an intercepted Job is found, it is started by the Universal Connector for SAP.

A maximum of 2 intercepted Jobs in parallel are started ( Parameter: virtual resource limit = 2 ). If you want to start more intercepted Jobs in parallel, the Parameter can be increased as required.

The started Jobs will have the naming: SAP_IntCpt#${JOBNAME}#${JOBCOUNT}, where:

  • JOBNAME is the name of the Intercepted Job in SAP and

  • JOBCOUNT the Jobcount ID of the Intercepted Job in SAP.

In the example, Universal Controller starts the SAP Job in Status : intercepted

  • JOBNAME: BASIS_04

  • JOBCOUNT: 125555600

In Universal Controller, the SAP Task Instance has the name:

SAP_IntCpt#BASIS_04#12555600 ( SAP_IntCpt#${JOBNAME}#${JOBCOUNT} )

SAP Interception

The following will provide some information on how to enable Job Interception in SAP via the XBP Interface and how to intercept a Job in SAP.

Enable SAP Interception for the XBP Interface

SAP job Interception need to be enabled in SAP.

In the SAP system, run the INITXBP2 ABAP program in the transaction se38 and enable job interception Activate 3.0.

Intercept Jobs in SAP

To intercept Jobs in SAP, an activated Criteria Manager Profile is required. All Jobs matching the Criteria Profile will be intercepted.

A criteria manager profile is created using the SAP transaction crit .

In the example below, all Job of the user STONE in the Client 001 will be intercepted.

A Criteria Manager Profile can also be maintained via a Universal Controller SAP task.


The following Actions are supported:

SAP Task Command Group


Set CM Profile

The SET CM CRITERIA command sets the criteria for a profile.

Create CM Profile

The CREATE CM PROFILE command creates a new Criteria Manager profile.

Activate CM Profile

The ACTIVATE CM PROFILE command activates a criteria profile of the specified type.

Deactivate CM Profile

The DEACTIVATE CM PROFILE command deactivates a criteria profile of the specified type.

Delete CM Profile

The DELETE CM PROFILE command deletes a criteria profile from an SAP system.

Display CM ProfileThe DISPLAY CM CRITERIA command displays the criteria hierarchy of a particular profile in XML format.

For details, refer to the Universal Connector for SAP Commands