ABAP Objects can indicate that their state has changed by triggering a method. Events can be defined in classes or in interfaces. Corresponding methods can trigger these events with the RAISE EVENT statement. Each class (or interface) that is going to handle the corresponding event must implement a relevant handler method, and register it using the SET HANDLER statement. When an event occurs, the system calls all of the handler methods registered for that event.
Like method definitions, events have a parameter interface. The only difference is that events may only have EXPORTING parameters.
Prerequisites
You must already have created the class or interface.
Procedure
Result
You have now created events for your object type. The events are listed in the declaration part of the class or interface after the EVENTS statement.
You can specify events further by giving them EXPORTING parameters. You can find the procedure under
Creating Parameters and Exceptions and under Implementing Methods.You can find more information about event handling with OO ABAP in the keyword documentation for example for the RAISE EVENT statement.
See also:
Creating Event Handler Methods