SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Calling and leaving program units → Calling Processing Blocks → Call Event Handler →Syntax
RAISE EVENT evt [EXPORTING p1 = a1 p2 = a2 ...].
Addition:
... EXPORTING p1 = a1 p2 = a2 ...
Effect
This statement can only be used in methods. It raises 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 undefined and can change
while the program is being executed. After the event handlers have been executed, the system continues with the method after RAISE EVENT.
... EXPORTING p1 = a1 p2 = a2 ...
Effect
If the addition EXPORTING is used, 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.
a1, a2, ... are
general expression positions. In other words, functions and expressions can be passed as actual parameters, alongside data objects.
Special rules apply in this case.
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.
Non-Catchable Exceptions