Skip to Content
avatar image
Former Member

Underlying Table Line in Grid after Filter

Easy Question.

When I present a table in an alv grid, I allow the user to double click to perform additional operations on the record.

The double click is handled as follows....

* --- Get the row index ---
call method obj_alv_grid->get_current_cell
        e_row     = cc_index
        es_col_id = cc_col_id.

* --- Get the underlying row
    read table t_outtab index cc_index into wa_outtab .

* --- subsequent code

Lets say my t_outtab has 12 records, labeled, in order, January-December.

When I select June, cc_index would be set to 6.

But, lets say the user filters the data so that only Apr, May, and Jun are shown.

When June is selected, cc_index is set to 3 (as it is the 3rd record shown).

This messes up my subsequent read.

How do I know the index into the underlying data table. ?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 17, 2008 at 05:31 PM

    So, it seems this was easy.

    I should be looking at the e_row imported with the event

    class lcl_event_receiver definition .
      public section .
        methods on_double_click
        for event double_click
        of cl_gui_alv_grid
        importing e_row e_column es_row_no sender 

    Add comment
    10|10000 characters needed characters exceeded