Entering content frame

Conceptual documentation Event Concepts Locate the document in its SAP Library structure

Validity: Only in the Background Processing System

Events have meaning only in the background processing system. You can use events only to start background jobs.

Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.

Types of Events

There are two types of events:

Event Arguments

You can qualify an event with an event argument. An event argument is a text string that you can optionally associate with an event. You can specify an event argument during the following operations:

Unlike event IDs, event arguments are not defined in the R/3 System.

If you specify an argument when you schedule a job, then the job is eligible to start when the event is triggered. The job can start if:

If you do not specify an argument when you schedule a job, then the job can start as soon as the event occurs. The job is eligible to start no matter what argument string is supplied with the event.

When a Job Waiting for an Event May Start

Job

Event

Result

Job scheduled with Event ID "JSTART" Argument "A"

JSTART triggered, no argument

Job starts

 

JSTART triggered with argument "A"

Job starts

 

JSTART triggered with argument "B"

Job does not start; continues to wait for JSTART.

Job scheduled with Event ID "JSTART", no argument

JSTART triggered, no argument

Job starts

 

JSTART triggered with any argument

Job starts

 

An ABAP program that is running as a background job can find out what event and argument were presented when it was started. This makes it possible for ABAP programs running in the background to react intelligently to an event depending upon the argument string that was supplied with it.

Example: Events and Event Arguments

Switching to a different operation mode triggers an event in the background processing system. The event is an R/3 System event named SAP_OPMODE_SWITCH. As an argument, the event carries the name of the new operating mode.

If you schedule a job to wait upon the event SAP_OPMODE_SWITCH with argument NIGHT, then your job will become eligible to start when the operating mode NIGHT next becomes active.

You can also schedule jobs to be repeated whenever an event occurs. In the previous example, your job would be run whenever operating mode NIGHT becomes active, not just the first time that the event occurs.

Note

You can schedule a job to wait for an operation mode to become active with the Operation mode button in the job scheduling function. You need not schedule the job to wait for the SAP_OPMODE_SWITCH event.

Leaving content frame