Show TOC

Procedure documentationIntercepting SAP Jobs Locate this document in the navigation structure

 

Often jobs are scheduled by users and interfere with other processes or need to follow complex rules prior to execution. Job interception allows SAP CPS to take control of the job and to let it run based on previously defined criteria. Job interception can be done in two ways:

  • by the SAP System itself.

  • by SAP CPS, also called late intercept.

In the first instance, the SAP System compares the job to a list of criteria and decides to execute the job or to "derelease" the job, the latter means that the job will not run at this point. SAP CPS will take control of "dereleased" jobs and reschedule them. This functionality requires XBP 2.0 or later. With XBP 3.0 your interception rules use the processing order, so you can easily include and exclude certain jobs from interception.

Note Note

XBP 3.0 requires a logical system for the client, see for more information on creating logical systems for clients.

End of the note.

In the second instance, SAP CPS will attempt to intercept the job before SAP has a chance to execute it. This is not always reliable, this functionality requires that the Redwood transport files be loaded.

Job Handling Field

The job handling field on an SAP system allows you to apply the job control rules to jobs intercepted by SAP, all jobs or none (disbaled). When job handling is disabled, your job control rules will be ignored and no jobs will be picked up on the SAP side.

Connection String

The connection string allows you to specify a subset of the settings you can specify in other SAP client tools:

  • TYPE - (optional) The type of SAP system to connect to, only R3 issupported.

  • ASHOST - The application server host to conect to, this should be the message server.

  • GROUP - (optional) Name of the SAP server group. This is a group of application servers in a load balancing connection. The default value is PUBLIC.

  • GWHOST - (optional) The gateway host to use for the connection.

  • MSHOST - The message server host of the SAP instance.

  • R3NAME - The SID of the SAP instance.

  • SYSNR - The system number of the SAPO instance, it is usually the last two numbers of the port.

  • TRACE - allows you to trace the RFC session, should be left on 0 unless SAP Support Services request you to change this value.

Note Note

Although it would be valid to specify a username and password as well as other settings, SAP CPS will discard them.

End of the note.

The following two combinations are frequently used:

Connection to a message server

MSHOST=<MS host> R3NAME=<SID> GROUP=<group>

Connection to a central or dialogue instance

ASHOST=<CI/DI-hostname> SYSNR=<Sys-Number> TRACE=0

Note Note

If you specify the Application Server Host in the connection string, you must not specify a Message Server hostname or the R3NAME.

End of the note.

Recommendation Recommendation

For better performance, you should connect to the Message Server of the SAP instance.

End of the recommendation.

Prerequisites

  • Client / username and password of the RFC user.

  • XBP versions supported in the SAP System (XBP 0.1, 1.0, 2.0, 3.0) (for parent child dependencies the report INITXBP2 must be run).

  • The SAP System must have a default client configured, please refer to the SAP documentation.

Procedure

To monitor jobs in an SAP System:

  1. Choose   Environment → SAP Systems   in the Navigation bar.

  2. Choose the SAP System name in the overview table

  3. Choose Edit from the context menu

  4. On the SAP System tab, enter a Connect String, a Time zone, and set Job Handling to All

  5. On the XBP tab, fill in Client Number, Username, password, and check Default Client, if no default client has been previously specified.

  6. On the Job Control Rules tab, choose Monitor for Action, fill in a valid client mask and username

  7. Choose Save & Close to save the changes and close the edit window.

To intercept jobs in an SAP System:

  1. Choose   Environment → SAP Systems   in the Navigation bar.

  2. Choose the SAP System name in the overview table.

  3. Choose Edit from the context menu.

  4. On the SAP System tab, enter a Connect String, a Time zone, and set Job Handling to All.

  5. On the XBP tab, fill in Client Number, Username, Password and check Default Client, if no default client has been previously specified.

  6. On the Job Control Rules tab, choose Schedule for Action, fill in a valid client mask and username.

    1. With XBP 2.0 enabled, all jobs matching the client and username masks will be intercepted in the Central Scheduler.

  7. Choose Save & Close to save the changes and close the edit window.

Values

Configuration information is available in the Job Interception Configuration section of the documentation.

Example

You need to edit an SAP System running against SAP BW 6.40 to intercept jobs.

You have the following information:

  • The SAP R/3 connect string is: MSHOST=169.254.10.12 R3NAME=PR1 GROUP=SPACE

  • The Client is 200, username is masalan and password is masalan

  • XBP version supported is XBP 2.0.

  • The default client of the SAP System is client 200.

  1. Choose   Environment → SAP Systems   in the Navigation bar.

  2. Choose the Edit button and enter the information below

  3. Choose   Environment → Process Servers  

  4. From the context menu of the process server that belongs to the newly create SAP System connection, choose Start.

Tab

Field

Example

SAP System

Name

sapbw_prd

SAP System

Connect String

MSHOST=169.254.10.12 R3NAME=PR1 GROUP=SPACE

SAP System

Job Handling

All

SAP System

Time zone

Europe/Berlin

SAP System

Application

SAPBW

SAP System

Description

Production SAP BW system in Berlin

XBP

Client Number

200

XBP

Username

masalan

XBP

Password

******* (masalan in this example)

XBP

Audit level

0 - Change actions

XBP

SAP Language

EN

XBP

Description

Client for the XBP interface

XBP

Default Client

selected

XBP

Max RFC Connections

XBP

Interface Version

2.0

XBP Job Control Rules

Processing order

0

XBP Job Control Rules

Action

Intercept

XBP Job Control Rules

Client Number Mask

20*

XBP Job Control Rules

Job Name Mask

RSUSR*

XBP Job Control Rules

Username Mask

*

XBP Job Control Rules

Description

Intercept jobs starting with RSUSR in their name

XBP Job Control Rules

Default Queue

XBP Job Control Rules

Priority

50