Intercepting SAP Jobs
Often jobs are scheduled by users and interfere with other processes or need to follow complex rules prior to execution. Job interception allows Redwood Server 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. (more reliable, requires XBP 2.0 or higher)
- by Redwood Server, also called Redwood intercept. (best effort, not guaranteed, requires transport files for XBP 1.0 and lower)
You can force the use of a specific XBP release, if it is available in the SAP system, by specifying the SynchronizationMode registry entry.
SAP Intercept
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. Redwood Server will take control of "dereleased" jobs and reschedule them. This functionality requires XBP 2.0 or later. With XBP 3.0 your interception rules have a processing order, so you can easily include and exclude certain jobs from interception.
note
XBP 3.0 requires a logical system for the client, see Setting Up Logical Systems for more information on creating logical systems for clients.
note
If your SAP system supports XBP 3.0, you should decide which tool of Redwood Server or SAP CRITERIA_MANAGER
to use for defining intercept criteria and exclusively use that.
Late Intercept
Redwood Server attempts 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 (disabled). When job handling is disabled, your job control rules will be ignored and no jobs will be picked up on the SAP side. When you set it All and you have invalid jobs in your SAP system, Redwood Server may experience issues. If you are not monitoring jobs, this should be set to Intercept.
Connect String
ASHOST
- The application server host to connect to.GROUP
- (optional) Name of the SAP server group. This is a group of application servers in a load balancing connection. The default value isPUBLIC
.GWHOST
- (optional) The gateway host to use for the connection.MSSERV
- (optional) The port of the message server; this is required if the/etc/services
file is not correctly configured for theR3NAME
service nameR3NAME
- The SID of the SAP instance.SYSNR
- The system number of the SAP instance, it is usually the last two numbers of the port.TRACE
- allows you to trace the RFC session, should be left on0
unless Redwood Support Services request you to change this value.TYPE
- (optional) The type of SAP system to connect to, onlyR3
is supported.- SNC - SNC requires you setup the SAP connector as well as the SAP System for SNC connections. See Secure Connections with SNC for more information.
SNC_MODE
- Activates SNC for the connection. ExampleSNC_MODE=1
(required for SNC).SNC_PARTNERNAME
- Specifies the DN or Kerberos name of the user. ExampleSNC_PARTNERNAME="p:CN=SERVERS,OU=SAPR3,DC=EXAMPLE,DC=COM"
(required for SNC).SNC_SSO
- Enables SSO (default). ExampleSNC_SSO=1
SNC_QOP
- Specifies how secure the connection is 1=Auth only, 3=Integrity, 3=Privacy, 8=Default, 9=Maximum. ExampleSNC_QOP=3
.SNC_MYNAME
- Specifies the DN or Kerberos name of the PSE to use. Example:SNC_MYNAME="p:CN=connector,OU=SNC,DC=EXAMPLE,DC=COM"
.SNC_LIB
- Specifies the location of thesapcrypto
library. Example:SNC_LIB="C:/redwood/sapcrypto.dll"
.
note
Although it would be valid to specify a username and password as well as other settings, the connector will discard them.
You need several entries in your LOCAL /etc/services
on the Redwood Server host for the remote SAP system when specifying MSHOST
connection strings with R3NAME=SAPSID
. This is why R3NAME=36<instance_ID>
is recommended.
The following two combinations are frequently used:
Connection to a message server
MSHOST=<MS host> R3NAME=<SAPSID> GROUP=<group> [MSSERV=36<Sys-Number>
Connection to a central or dialogue instance
ASHOST=<CI/DI-hostname> SYSNR=<Sys-Number> TRACE=0
tip
For better performance, you should connect to the Message Server of the SAP instance; ideally specifying the port for R3NAME
(36<instance_ID>
).
Prerequisites
- The JCo libraries must be available, see the Installing the JCO Libraries topic for more information.
- 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:
- Choose "Environment > SAP" in the Navigation bar.
- Choose the SAP System name in the overview table.
- Choose Edit from the context-menu.
- On the SAP System tab, enter a Connect String, a Time zone, and set Job Handling to All.
- On the XBP tab, fill in Client Number, Username, Password, and check Default Client, if no default client has been previously specified.
- On the Job Control Rules tab, choose Monitor for Action, fill in a valid client mask and username.
- Choose Save & Close to save the changes and close the edit window.
To intercept jobs in an SAP System:
- Choose "Environment > SAP" in the Navigation bar.
- Choose the SAP System name in the overview table.
- Choose Edit from the context-menu.
- On the SAP System tab, enter a Connect String, a Time zone, and set Job Handling to Intercept.
- On the XBP tab, fill in Client Number, Username, Password and check Default Client, if no default client has been previously specified.
- On the Job Control Rules tab, choose Schedule for Action, fill in a valid client mask and username.
- With XBP 2.0 enabled, all jobs matching the client and username masks will be intercepted in the central Redwood Server.
- Choose Save & Close to save the changes and close the edit window.
Synchronize Intercept Criteria with the SAP System:
- Choose "Definitions > Processes" in the Navigation bar.
- Choose the process definition named SAP_SynchronizeInterceptionCriteria in the overview table.
- Choose Submit from the context-menu, set the target SAP system, select a direction and choose Submit.
note
You should always choose Append unless you are sure of what you are doing. You will overwrite interception data in the SAP system.
tip
Run the process definition SAP_SynchronizeInterceptionCriteria with the action Show only to inspect the current settings and make sure you are not deleting data you need.
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 example and password is example
- XBP version supported is XBP 2.0.
- The default client of the SAP System is client 200.
- Choose "Environment > SAP" in the Navigation bar.
- Choose the Edit button and enter the information below.
- Choose "Environment > Process Servers".
- From the context-menu of the process server that belongs to the newly created 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 | example |
XBP | Password | ******* (example 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 | Schedule |
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 | Schedule jobs starting with RSUSR in their name |
XBP Job Control Rules | Default Queue | |
XBP Job Control Rules | Priority | 50 |