Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Row position

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hello

in List programming

Get Cursor field

regards

Chris

former_member188685
Active Contributor
0 Kudos

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

.

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Hello,

Try with the method:

cl_gui_alv_grid=>GET_SELECTED_ROWS.

Regards,

Sandeep

Former Member
0 Kudos

Hi,

try using system field,

sy-curow-Vertical cursor position on the screen display of a screen. Counting begins at line 1.