Best Practices for the Automic Automation / SAP Integration

Monitoring SAP PI Communication Channels

SAP PI adapters are used to exchange data with the SAP Process Integration. They transform messages so that they can be forwarded via communication channels.

The SAP Agent provides functions which can be used to handle adapters:

  • Starting communication channels
  • Stopping communication channels
  • Querying information about communication channels

The functions XI_GET_CHANNEL and XI_SET_CHANNEL can be used in SAP jobs. Information about communication channels is stored as an XML document in the job report. For more information on formatting this data, see Script Functions for XML Elements.

Communication channels can also be monitored via Event objects of type Console (Console (CONS) Event Objects). An event is triggered whenever the status changes.

Activate the XI interface with the SAP Executor's INI file parameters in the section [SAP_XI].

A Login object with valid login data is required for accessing the XI system. The XI user must be authorized to control the XI communication channels.

A user needs the following role to query the status of communication channels:

  • xi_af_channel_admin_display

A user needs a role with the following action to start or stop communication channels:

  • xi_af_channel_admin_modify

Since none of these actions are assigned to an ABAP role by default, you must explicitly assign them to a Java role which you then in turn assign to a java user or a user group. To do this use SAP NetWeaver Administrator with the quick link /nwa/identity.

We recommend using different Login objects for SAP and XI system if both are installed on the same host. Otherwise, the login entry is not unique.

AE JCL for XI

Script elements

Description

XI_GET_CHANNEL

Lists communication channels

XI_SET_CHANNEL

Starts and stops communication channels

Deleting SAP ABAP Jobs in CCMS

When creating an SAP Job you can specify what should happen to the job in the Automation Engine when the job has finishes in your SAP system. You do this on the SAP page of the job definition. The parameter is called Delete Job and the available options are:

  • Do not delete job
  • Always delete job in CCMS after completion (this is the default value).
  • Only delete job from CCMS if no error occurred

If you leave the default option activated (Always delete job in CCMS after completion) means that as soon as the job is completed in your SAP system, it is deleted and you will not see it in the Process Monitoring perspective.

This is useful if you are dealing with jobs that are scheduled to run at very short intervals to avoid cluttering the list of activities in your SAP system. However, if that is not the case, you may want to have these tasks displayed; for this purpose, choose any of the other two options.

Assigning the Right Priority

When jobs are waiting for a free batch process in SAP to be executed, their priorities determine which jobs go first.

When defining an SAP ABAP job in the Automation Engine, you also assign it a priority in the SAP system. You do this in the Job Class dropdown list on the SAP page of the Job object definition. The available options are A (highest priority, B and C (lowest priority).

Tip: Assign Job ClassA to system jobs (basis, warehouse and maintenance jobs in SAP executed by system administrators), as these are prerequisites for all other jobs to run smoothly.