05-06-2009 11:18 AM
Hi Experts,
I have editable ALV, after edit I refresh ALV, but problem is, that position is set to position 1.1. I need to keep cursor at edited position.
I use ALV through function module REUSE_ALV_GRID_DISPLAY.
Thansk®ards,
Jirka
05-07-2009 1:44 AM
Hi,
how exactly do you refresh your table? For example the method REFRESH_TABLE_DISPLAY of class CL_GUI_ALV_GRID has optional parameter IS_STABLE where you can set up focused cell after refresh. So try to find similar option in your case.
Good luck
05-14-2009 8:01 AM
Hi
for reuse_alv_grid_display the field catalog to be passed is of type 'slis_t_fieldcat_alv '.
it has fields row_pos and col_pos -- set thm for the reqd field
type-pools: slis.
data:
t_fcat type slis_t_fieldcat_alv.
fs_fcat like line of t_fcat.
fs_fcat-fieldname = ' ...... '.
fs_fcat-row_pos = ' ' .
fs_fcat-col_pos = 4.(say)
modify t_fcat from fs_fcat transporting row_pos col_pos
where fieldname = ' ' .
Regards,
08-30-2011 12:13 PM
In the 'USER_COMMAND' callback routine you created for FM 'REUSE_ALV_GRID_DISPLAY' (import parameter I_CALLBACK_PROGRAM) , add the following lines....
move 'X' to rs_selfield-refresh.
move 'X' to rs_selfield-col_stable.
move 'X' to rs_selfield-row_stable.
Even easier than method calls!
02-04-2013 4:02 PM
Hi Chris,
It's been a long time since the last reply at this subject, but I'm facing a issue with rows positioning on ALV when it's running on WEBGUI. The same application (transaction) executed using SAP GUI works perfectly (about ALV keeping the row positioning after a ALV refresh) and when its executed under Portal using WEBGUI (ITS) the row position is not retained after an ALV refresh.
I'll really appreciate any help or clue about this issue.
Thank you in advance,
Nelson Bertolino
02-05-2013 4:30 AM
In order to refresh the ALV and keep the scroll position, you have to read the scroll posiition before refresh and set the scroll position after the refresh..
Below code will help,.. Whenever you want to refresh the alv use these in your coding...
FORM refresh_alv_display.
DATA: li_rows TYPE lvc_s_roid,
li_col TYPE lvc_s_col,
lws_row_id TYPE lvc_s_roid,
lws_col_id TYPE lvc_s_col,
ls_col TYPE lvc_s_col,
ls_num TYPE lvc_s_roid.
CALL METHOD c_grid->get_current_cell
IMPORTING
es_col_id = li_col
es_row_no = li_rows.
CALL METHOD c_grid->get_scroll_info_via_id
IMPORTING
es_col_info = ls_col
es_row_no = ls_num.
CALL METHOD c_grid->refresh_table_display.
CALL METHOD c_grid->set_scroll_info_via_id
EXPORTING
is_col_info = ls_col
is_row_no = ls_num.
lws_row_id-row_id = li_rows-row_id.
lws_col_id-fieldname = li_col-fieldname.
CALL METHOD c_grid->set_current_cell_via_id
EXPORTING
is_column_id = lws_col_id
is_row_no = lws_row_id.
ENDFORM.
02-14-2013 5:19 PM
You know, I made what you suggest. It works fine on SAP GUI environment. But, when I run the report on WEBGUI environment, it doesn't work. Although the ALV position is kept, the screen is refreshed and the ALV is positioned on top, again.
Do you have any clue about it. I think it will not work on WEBGUI environment.
Regards.
10-16-2013 9:49 AM
Hello Nelson,
I had the same problem, an ALV works fine on SAP GUI, but it is positioned on top when refresh on WEBGUI, ¿how do you solved it?
Thanks in advance,
Fidel.
10-28-2013 9:43 AM
Hello,
Finally the problem was with the nivel patch of kernel. We were in 401 and we had to upgrade to 500.
Fidel.
02-13-2014 11:26 AM