Ansicht
Dokumentation

ABAPRAISE_EVENT - RAISE EVENT

ABAPRAISE_EVENT - RAISE EVENT

General Material Data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

RAISE EVENT

Short Reference



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 raised, all event handlers that were registered for this event with the statement SET HANDLER are executed. The order of execution is undefined and can change during program execution. After the event handlers have been executed, the method continues after RAISE EVENT.

Addition

... 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 those event handlers whose definition lists the according formal parameters after the addition IMPORTING of the statements $[CLASS-$] EVENTS.

a1, a2, ... are general expression positions, which means that, alongside data objects, functions and expressions can also be passed as actual parameters. Special rules apply in this case.

Notes

  • To avoid endless recursion, a maximum of 1023 further events can be raised using RAISE EVENT in event handling.
  • If the formal parameter sender is defined for an event handler, this is automatically supplied with the reference to the raising object when instance events are raised. It cannot be specified explicitly after EXPORTING.

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

Exceptions

Non-Catchable Exceptions

  • Cause: RAISE EVENT statements nested too deeply.
    Runtime Error: RAISE_EVENT_NESTING_LIMIT






TXBHW - Original Tax Base Amount in Local Currency   General Material Data  
This documentation is copyright by SAP AG.

Length: 3823 Date: 20240420 Time: 095250     sap01-206 ( 60 ms )