SAP CLASS-EVENTS ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID CLASS-EVENTS
• CLASS-EVENTS ABAP Statement

CLASS-EVENTS
Short Reference

ABAP_SYNTAX
CLASS-EVENTS evt $[EXPORTING parameters $].

ABAP Addition
... EXPORTING parameters

What does it do?
This statement declares a static event evt in a class or interface. The naming conventions apply to the name evt. The statement RAISE EVENT can be used to raise the static event evt in all methods of the same class or of a class that implements the interface, as well as in the methods of subclasses if it is visible here.



Latest notes:

Event handlers that are declared for a static event inherited from a superclass can only respond to this event if it is raised by a method of the subclass or one of its subclasses. If the event is raised in a static method of a superclass, it is not handled, even if the method is called in a subclass or if the name of the subclass is specified.
NON_V5_HINTS
ABAP_HINT_END
• EXPORTING CLASS-EVENTS

ABAP Addition

What does it do?
The addition EXPORTING defines the parameter interface of the event evt. The syntax and meaning of the additions parameters are the same as in the definition of instance events using the statement EVENTS.



Latest notes:

Static events do not have an implicit formal parameter sender.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Declaration of static events in the class CL_ABAP_BROWSER.
ABEXA 01627
ABAP_EXAMPLE_END

ABAP_EXAMPLE_ABEXA
Events in Inheritance
ABAP_EXAMPLE_END

Return to menu