09-24-2008 10:55 AM
Hi All,
I have an ALV Grid display. I am using hot-spot to uncheck all lines pertaining to a particular id even if we click it on one check-box. Once this is done the grid is refreshed and the control goes back to the first line. And I have to scroll down all the way to find where the cursor was last there.
READ TABLE i_output INTO wa_output INDEX p_selfield-tabindex.
CHECK sy-subrc = 0.
l_zuonr = wa_output-zuonr.
IF wa_output-check_box EQ 'X'.
CLEAR wa_output-check_box.
MODIFY i_output FROM wa_output TRANSPORTING check_box
WHERE zuonr = l_zuonr.
ELSE.
wa_output-check_box = 'X'.
MODIFY i_output FROM wa_output TRANSPORTING check_box
WHERE zuonr = l_zuonr.
ENDIF.
p_selfield-refresh = 'X'.
My requirement is to display the Grid with the cursor back to the next line or the same line where it was last.
Is there a way to capture the last cursor position and bring the control there, so the user can start scrolling from there downwards?
Thanks,
Payel
09-24-2008 11:00 AM
09-24-2008 11:01 AM
this is simple. use row stable and column stable.
p_selfield-refresh = 'X'.
p_selfield-row_stable= 'X'. "For Row
p_selfield-col_stable = 'X'. " For Coloumn
.
09-24-2008 11:01 AM
Hello,
Try with the method:
cl_gui_alv_grid=>GET_SELECTED_ROWS.
Regards,
Sandeep
09-24-2008 11:02 AM
Hi,
try using system field,
sy-curow-Vertical cursor position on the screen display of a screen. Counting begins at line 1.