Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling Processing Blocks →  Call Event Handler →  SET HANDLER 

SET HANDLER - static_event

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


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

Addition

... ACTIVATION act

Effect

This statement registers the event handlers handler1 handler2 ... for the corresponding static events. An event handler is executed if the corresponding static event is triggered with RAISE EVENT. With the ACTIVATION addition, event handlers can be deregistered or a dynamic registration can be carried out.

The list handler1 handler2 ... has the same form as for instance events, but can only contain event handlers for static events declared with CLASS EVENTS.

The event that can be handled by an event handler for static events is already uniquely set by means of its definition with the statement [CLASS-]METHODS. The FOR addition, which is required for registration of instance event handlers to determine the triggering instances, must not specified upon registration. Registration of an event handler for static events is independent of the instance and is valid globally for the current internal mode.

Addition

... ACTIVATION act

Effect

For the syntax and semantics of the ACTIVATION addition, the same applies as for SETHANDLER.


Note

As long as the registration of an instance method as an event handler is not withdrawn using ACTIVATION " ", the related object can not be deleted by the garbage collector since it is still used by the runtime environment.