Lesson 2: Event Handling 
You previously added a function to your editor that allows you to load the contents of an internal table into the text window. Now, you implement a function that converts a text line into a comment line when you double-click the line.
In this lesson, you learn:
Register events for a control that you want to catch.
Assign events caught to event handler methods in the ABAP program.
Write event hander methods and declare them to the control.
The event handling of controls is based on that of ABAP Objects. Generally, you use events in ABAP Objects to inform objects that a specific state has occurred.
Example
For example, an object may use an event to indicate that:
The user has clicked an image.
The user has navigated to a new page in a Web browser.
The object is ready to output a table on the screen.
The following graphic shows how you can use events in your programs:

An event is a component of a class or an interface. Within the methods of the class, you can trigger defined events using RAISE EVENT.
To be able to respond to an event, you must define a method and link it to the event. It is then sufficient to trigger the event in order to handle it. These methods are also called Event Handler Methods. By defining a second class, you can separate these methods from the object that triggers the event. This way, you can also group together handler methods of a specific type in a class.
Note
In the above graphic, the event handler method is defined as an instance method. In this case, you must first instantiate an object of the class to enable the system to call the method. You can also define the method as a static method of the class. In this case, you do not need to generate the handler object.
Once the objects have been instantiated, you use the SET HANDLER statement to link the event handling method to the object in which the event is defined. The runtime environment then ensures that the method implemented is automatically called at this event.
For more information on event handling, see ABAP Objects.
Lesson 3: Flush Optimization describes how you use flush calls and how methods are buffered before they are transferred to the frontend.