Skip to Content
0
Former Member
Jun 04, 2009 at 11:37 AM

Problem in GET_CURRENT_CELL method in oops ALV GRID

483 Views

Hi,

I got output records int eh ALV GRID and i have a one push button in the report. When i select any CELL(say 5 row) in ALV GRID and click on this push Button, it should display me the Row number (row number = 5). I have used the GET_CURRENT_CELL. when I execute the report and select one cell (5 row cell )and click on push button, it is giving me the Row number(row number = 5) correctly. Again when i choose the cell (say 8 record)second time, it should display give the row number = 8 but always it is giving me the First row number .

  • Get selected row

PERFORM get_selected_row CHANGING l_sel_row.

FORM get_selected_row CHANGING p_l_sel_row.

DATA: li_sel_row TYPE i, "Selected row

lv_rowid TYPE lvc_s_row.

  • Query which row was selected.

CALL METHOD grid_brr_main->get_current_cell

IMPORTING

e_row = li_sel_row

es_row_id = lv_rowid.

MOVE lv_rowid-index TO p_l_sel_row.

ENDFORM. " get_selected_row

Regards,

Deepthi.