SAP EVENTS OVERVIEW
Get Example source ABAP code based on a different SAP table
ABAP_OBJ - Events
Events are generally characterized by occurring at a particular point in time. When an event is raised, other actions can be executed as a consequence of the event. Examples of when events can be raised are changes in the status of an object, such as when a booking is canceled or a new account (object) is created. Other interested objects are informed of these situations by events.
In contrast to other object-oriented programming languages, the event concept in ABAP Objects is an integral component of the language itself. Objects can contain declared events as part of their interface using the statement
An event handler in an object statically determines which events of which classes the object can handle. Before an object can react to relevant events, its event handlers must be registered dynamically for the events of other objects using the statement
If an object raises an event during the execution of a method, each suitable registered event handler method is called, whereby the raising method can pass parameters. If multiple event handlers are registered for one event, they are called consecutively in an undefined order.
Event handlers can also be called directly. There can be two reasons for this: either an event handler must handle an event without being registered, or the raising of an event is to be simulated.
Events can have output parameters which are defined like those of methods. An event handler can pass exactly these output parameters as input parameters, always using pass by value. In addition, there is always an implicit parameter called
ABAP_EXAMPLE_ABEXA
ABAP_EXAMPLE_END