REUSE_ALV_EVENTS_GET.
This FM is used to get the default event table of the ALV LIST DISPLAY.
The IN_EVENTS internal table is of TYPE SLIS_T_EVENT. This table contains
all the events wrapped up in the ALV LIST or ALV GRID and consistsof two fields
NAME and FORM .The NAME corresponds to names of the events like TOP_OF_PAGE and END_OF_PAGE ,USER_COMMAND and FORM will
contain the name of the FORM ROUTINE that will be called dynamically through callback mechanism when the particular event
will fire and is initial for all events bt default and has to be filled for
events for which handling is required.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IN_EVENTS[].
e.g.
DATA: W_EVENT TYPE SLSI_ALV_EVENT "LINE ITEM OF EVENT TABLE
DATA: IN_EVENTS TYPE SLSI_T_EVENT . "Internal table containing events
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IN_EVENTS[].
RTEAD TABLE IN_EVENTS WITH KEY NAME = 'TOP_OG_PAGE'
INTO W_EVENT.
IF SY-SUBRC EQ 0.
MOVE 'F3000_TOP_OF_PAGE' TO W_EVENT -FORM.
MODIFY IN_EVENTS FROM W_EVENT INDEX SY-TABIX.
ENDIF.
Here the FORM ROUTINE 'F3000_TOP_OF_PAGE' is being set up for the
event TOP_OF_PAGE which will fire when the ALV LIST will be displayed ,This form
will be called dynamically by th ALV LIST display during top_of_page event and for this the modified Events internal
table has to be passed to the FM 'REUSE_ALV_LIST_DISPLAY' in the exporting parameter IT_EVENTS. Failing this the form '3000_TOP_OF_PAGE'
will not be called . This event is used for placing heading information like Current date and time and the name of the report.