Events in Background Processing Explained

Definition

In addition to time- and calendar-based job scheduling, the background processing system supports event-driven scheduling. The image below illustrates how background processing events can be used and processed.

Use

Events have meaning only in the background processing system and can be used only to start background jobs.

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

A log of all the events raised in the system is stored in the event history. For more information, see Working with Raised Events.

Integration

Event Types

There are two types of events:

  • System events: Defined by SAP and triggered automatically by system changes, such as the activation of a new operation mode. You cannot modify system events.

  • User events: Defined by users. These events must be triggered from ABAP or from external programs. For example, use an external program to trigger a background processing user event to signal the arrival of external data to be read into the SAP System.

Event Arguments

An event argument is an optional text string you can use to qualify an event. Event-based jobs can be scheduled to start not only after a specific event, but also after an event qualified by specific event parameter.

You can specify an event argument when:

  • Scheduling a job to wait for the event

  • Triggering an event

Unlike event IDs, event arguments are not defined in the SAP System.

If you specify an argument when you schedule a job, then the job is eligible to start only when the event is triggered with the argument.

If you don't 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 does not start, continues to wait for JSTART A

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 allows ABAP programs running in the background to react intelligently to an event depending on the argument string that was supplied with it.

More Information