Know alv grid on event click
Is it possible to know the alv grid (TYPE REF TO cl_gui_alv_grid) on the event click? In fact, on a screen, I have 2 alv grids and I would like to store the alv grid name for a process at click moment.
Edited by: Xavier Couloumies on Sep 12, 2008 2:07 PM
Every event handler method has the optional IMPORTING parameter SENDER which corresponds to the control that raises the event.
Thus, you logic could look like this:
" Method definition: METHOD handle_double_click FOR EVENT double_click OF cl_gui_alv_grid IMPORTING ... sender. " optional parameter. " Implementation of your methods: METHOD handle_double_click. CASE sender. WHEN go_grid1. WHEN go_grid2. WHEN OTHERS. RETURN. ENDCASE. ENDMETHOD.