Application Development and Automation 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: 
Read only

ALV

Former Member
0 Likes
510

Hi,

My problem is...

I have 2 grids,one contains data which is above and the other grid is below without any data.

Now say I have 5 records in my 1st grid. I select the 4th one and push it down to the second grid. As soon as I do that I want my cursor to go to the record which was below this particular record in the 1st grid.

I tried set cursor and that doesn't work...any class or method or so where I can make the cursor to come to the next position in the 1st grid after pushing the record to the 2nd grid?

Please let me know asap....

4 REPLIES 4
Read only

Former Member
0 Likes
482

Not sure if you could do this using the REUSE_ALV* function modules. But if you are using ALV object CL_GUI_ALV_GRID then you could use the following instance methods:

SET_CURRENT_CELL_BASE

SET_CURRENT_CELL_ID

SET_CURRENT_CELL_ID2

SET_CURRENT_CELL_ROWPOS_COLID

Read only

0 Likes
482

So the current cell is automatically set and this should be done after refreshing grid 2? Also i hope these are public protected....? Set itself allows the cursor to remain on that? This should be done in the PBO event right? coz what i read was set cursor doesn't work well in PAI...that's y got this doubt

Read only

0 Likes
482

I don't know which spot would be the most efficient but you could try this in:

1) In the handler method that moves the line from grid1 to grid2(handle_user_command??)

2) Where you call method refresh_table_display for grid1

Read only

0 Likes
482

Thank you