RAISE EVENT

Short Reference

Syntax

RAISE EVENT evt [EXPORTING p1 = a1 p2 = a2 ...].

Addition:

... EXPORTING p1 = a1 p2 = a2 ...

Effect

You can only use this statement in methods. It triggers the event evt. evt is the name to be specified directly for an event that must be declared with the statement EVENTS or CLASS-EVENTS directly in the same class, in a superclass, or in an implemented interface.

After the event is triggered, all event handlers that were registered for this event with the statement SET HANDLER are executed. The execution order is based on the registration order. Following execution of the event handlers, the system continues with the method after RAISE EVENT.

Addition

... EXPORTING p1 = a1 p2 = a2 ...

Effect

With the addition EXPORTING, actual parameters a1 a2 ... can be assigned to all optional formal parameters p1 p2... of the event evt and must be assigned to all non-optional formal parameters. The values of the actual parameters are passed to the event handlers; the formal parameters are listed after the addition IMPORTING to the statements [CLASS-]EVENTS.

Notes

Example

Triggering an instance event e1. An actual parameter must be assigned to the non-optional formal parameter p1.

CLASS c1 DEFINITION.
  PUBLIC SECTION.
    EVENTS e1 EXPORTING value(p1) TYPE string
                        value(p2) TYPE i OPTIONAL.
    METHODS m1.
ENDCLASS.

...

CLASS c1 IMPLEMENTATION.
  METHOD m1.
    ...
    RAISE EVENT e1 EXPORTING p1 = '...'.
    ...
  ENDMETHOD.
ENDCLASS.

Exceptions

Non-Catchable Exceptions