SAP SET HANDLER STATIC ABAP Statements



Get Example source ABAP code based on a different SAP table
  



SET HANDLER, static_event
Short Reference

ABAP_SYNTAX
SET HANDLER handler1 handler2 ... $[ACTIVATION act$].

ABAP Addition
... ACTIVATION act

What does it do?
This statement registers the event handlers handler1 handler2 ... for the associated static events. The addition ACTIVATION can be used to deregister event handlers or to perform a dynamic registration.
An event handler is executed if the associated static event is raised using RAISE EVENT. The list handler1 handler2 ... has the same form as for instance events, but can only contain event handlers for static events declared using CLASS EVENTS.
Events that can be handled by an event handler for static events are defined uniquely by their definition in the statement $[CLASS-$] METHODS. During registration, the addition FOR, which is required to register or deregister instance event handlers that determine the raising instances, cannot be specified. An event handler for static events is registered or deregistered independently of the instance and this applies globally to the current ABAP_ISESS .

ABAP Addition

What does it do?
The syntax and semantics of the addition ACTIVATION are the same as for the statement SET HANDLER for instance events.



Latest notes:

As long as the registration of an instance method as an event handler for a static event is not canceled using ACTIVATION blank, the associated object cannot be deleted by the Garbage Collector. This is because it is still used by the runtime framework.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Registration of a static handler for a static event. After the event has been raised, the handling takes place.
ABEXA 00653
ABAP_EXAMPLE_END

Return to menu