Skip to Content

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

Know alv grid on event click

Hi,

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.

Thanks.

Edited by: Xavier Couloumies on Sep 12, 2008 2:07 PM

Tags:
Former Member
Former Member replied

Hello Xavier

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.

Regards

Uwe

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