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 → SET HANDLER →
SET HANDLER - static_event
Syntax
SET HANDLER handler1 handler2 ... [ACTIVATION act].
Addition:
Effect
This statement registers the event handlers handler1 handler2 ... for the associated static events. The addition ACTIVATION can be used to deregister event handlers or perform a dynamic registration.
An event handler is executed if the associated static event is triggered 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.
The event that can be handled by an event handler for static events is already defined uniquely by its
definition using the statement [CLASS-]
METHODS. The addition FOR (required when registering
or deregistering instance event handlers to determine the triggering instances) cannot be specified.
The registration or deregistration of an event handler for static events is independent of the instance and is applies globally to the current internal session.
... ACTIVATION act
Effect
The same applies to the syntax and semantics of the addition ACTIVATION as to the statement SETHANDLER for instance events.
Note
As long as the registration of an instance method as an event handler for a static event is not canceled using ACTIVATION " ", the associated object cannot be deleted by the garbage collector, since it is still used by the runtime environment.