Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Double click event in ALV

Hello everybody,

I have an ALV report that uses the function module REUSE_ALV_GRID_DISPAY

to display the screen. I was wondering if there is a way to implementthe

double click event when using this FM. What I want the user to be abl to

do is to double click on a line in the ALV and have another ALV grid

display with a more detailed list. I know that the double click eventcan

be implemented using the object oriented approach using a container bu I

would like to avoid redoing the report to use the object oriented apprach.

Any help would be greatly appreciated.


Yes there is a way.

You have to call your function like this:




I_CALLBACK_PROGRAM = z_variant-report

(or your program name, not sy-repid because this will

change during the use of ALV Grid)


(or some other name)


then you define your form:

form user_command2 using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'. (doubleclick)

if rs_selfield-tabindex > 0 and

rs_selfield-sumindex le 0.

read table itab into wa index


perform second_grid.



then your form for the second grid:

form second_grid.

(here you can make your selections for the second grid

based on the row you selected into workarea wa from the

first grid, and then call REUSE_ALV_GRID_DISPLAY again,

with another field catalog, internal table etc...)


good luck,


1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question