Reaction to External Events

Objective: A SAP event should be reported to the AE system in order to facilitate a reaction to it.

Objects used: Defining CONS Event Objects, Notification



Object types include events of type "Console". These are available for some of the AE-supported platforms, such as z/OS or Windows, and monitor their Console outputs. You can integrate this function in your AE system in order to react to events that were not started by AE. This is illustrated in the SAP event shown below. An operator should be informed when a transport is made to a productive SAP system.


First, a Console event is required which monitors the triggered SAP events. We want to react if a transport is made. The SAP system triggers the event "SAP_IMPORT_START" in such a case. Every time the agent informs the Console event, the content of !Process is executed. This means that a reaction to the triggered SAP event is possible with statements stored in !Process.

Create a Console event. The Console tab includes the main specification for this object. Select the agent which is connected to the SAP system. Specify the selection criteria for the SAP events to be monitored in the lower table area. You can specify particular events or define filters using the wildcard characters  "*" and "?"; you can even use several lines. In this example, we use one line. Enter the Event ID "SAP_IMPORT_START" and complete the fields "Event Parameter" and "Event Server" according to your SAP system.

The following illustration shows the complete Console tab:


There are numerous ways of reacting to a triggered SAP event. For example, you can start subsequent processing using a workflow. In this example, we inform a user with a notification.

Create a Notification object. Select the user to be informed and write a suitable message text. Specify the notification's priority and type.


In the Console event, click  the Event Process Page. We want to store detailed information about the SAP event in the report and activate the notification. Information can be stored using the script function GET_EVENT_INFO. Depending on the assigned parameter, it supplies particular information about the SAP event. Several keywords are available which are listed in the document describing this script function. The agent informs about the SAP events in the interval which the administrator defined with the setting JOB_CHECKINTERVAL. We want to know the time when the SAP event was triggered and we retrieve the complete event parameter and server because we have specified both filters in the Console event. Then activate the notification "CALL.SAP_IMPORT_START".

PRINT "timestamp: &timestamp#"
PRINT "Event_parameter: &parameter#"
PRINT "Event_server: &server#"


Information about the SAP event can also be passed to the notification. More detailed information is provided in the sample:  "Notification with Variable Message Text".

The report of the process execution is structured as follows: