Events in ALV reports

What are events in SAP ALV reports ? Working with events in ALV reports, use of events in ALV reporting SAP

+ -

There are total 17 events available for ALV reporting, by using this ALV events we can display report headers, report footers, user command, pf status etc.

We use function module REUSE_ALV_EVENTS_GET  to get events and use in our report.

Steps for implementing events.

STEP1: Call the function module 'REUSE_ALV_EVENTS_GET' and get all the events into a Internal Table(I_EVENTS).

STEP2: For each EVENT we need to provide a Sub-Routine name. So Read the EVENT from Internal Table into WorkArea and provide the Sub-Routine name.

STEP3: Finally, define the Sub-Routine and write logic.

Event definition Syntax.

*Get events using function module
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
* EXPORTING
* I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = I_EVENTS .
*add perform name to a event
READ TABLE I_EVENTS INTO WA_EVENTS WITH KEY NAME = ‘<EVENT NAME>' .
WA_EVENTS-FORM = '<FORM_XXX>' .
MODIFY I_EVENTS FROM WA_EVENTS INDEX SY-TABIX . 
*<EVENT NAME> = name of the event 
*<FORM_XXX> is perform name to implement for particular event

Event implementation in sub-riutine

FORM <FORM_XXX>.

** Add functionality for event
ENDFORM.

Please Sign in to ask a question

Was this lesson helpful to you? Yes No 29 People out of 44 think this lesson helpful


Lesson Navigation

←Previous Chapter
Next Chapter →