Testing Event Handling 

Within the test environment, you can test event handling using a default handler that catches the event when it is triggered. A simulation of the ABAP SET HANDLER statement assigns handlers to triggering events.

Prerequisites

You must have created an instance of the class that you want to test. Refer to Creating an instance.

Procedure

  1. In the Events branch of the object display, select an event.
  2. Choose Handler, to enable the handler.
    The icon changes, to indicate that the handler is active.
  3. Select a method in the object display.
  4. Choose Execute. For further information about calling the method, refer to Testing methods.

Result

If the method is called successfully, the chosen event is triggered and the result displayed.

To switch off the handler for the chosen event, choose Utilities ® Event handling ® Switch off handler.