2009 Jun 04 12:37 PM
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.
2009 Jun 04 12:48 PM
Hi,
Probably the data is not getting refreshed.
Please call the following methods.
REFRESH_TABLE_DISPLAY in PBO.
Call this method only if the grid has been created and called once using SET_TABLE_FOR_FIRST_DISPLAY.
As follows:-
If grid is initial.
call method grid-set_table_for_first_display
else
call method grid->REFRESH_TABLE_DISPLAY.
endif.In the PAI.
call the following method.
grid->CHECK_CHANGED_DATA
So that the data changes are transferred.
Regards,
Ankur Parab
Edited by: Ankur Parab on Jun 4, 2009 5:18 PM
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.
2009 Jun 04 12:48 PM
Hi,
Probably the data is not getting refreshed.
Please call the following methods.
REFRESH_TABLE_DISPLAY in PBO.
Call this method only if the grid has been created and called once using SET_TABLE_FOR_FIRST_DISPLAY.
As follows:-
If grid is initial.
call method grid-set_table_for_first_display
else
call method grid->REFRESH_TABLE_DISPLAY.
endif.In the PAI.
call the following method.
grid->CHECK_CHANGED_DATA
So that the data changes are transferred.
Regards,
Ankur Parab
Edited by: Ankur Parab on Jun 4, 2009 5:18 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |