To utilize one of the events above, let?s proceed with the standard procedure since we did not add this event in our general scheme at section D.1. First add a handler method in your handler class definition as: e.g.
METHOD handle_print_top_of_list FOR EVENT print_top_of_list OF cl_gui_alv_grid .
Then implement the method in the implementation part of your local class. e.g.
METHOD handle_print_top_of_list .
WRITE:/ 'Flights Made on ', sy-datum .
ENDMETHOD .
And register this method as the handler. e.g.
SET HANDLER gr_event_handler->handle_print_top_of_list FOR gr_alvgrid .
The output of these events can be examined at the print preview or in the printing.