‎2008 Mar 19 2:10 PM
Hi to all,
i'm trying to maintain selected rows after refresh, with method in subject, but it doesn't work.
could you help me?
‎2008 Mar 19 2:18 PM
Hi
U should call that method before refreshing your output. Can you post the code where u call the method?
Max
‎2008 Mar 19 2:18 PM
Hi
U should call that method before refreshing your output. Can you post the code where u call the method?
Max
‎2008 Mar 19 2:32 PM
Hi Max,
i'v solved the problem: i'm not using method table_refresh, but set_tabke_for_first_display.
in this cases method set_selected_rows had to be called after...
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_layout = ls_layout
it_toolbar_excluding = lt_toolbar_excl[]
is_variant = ls_variant
i_save = 'X'
i_default = 'X'
CHANGING
it_fieldcatalog = lt_fieldcat[]
it_sort = lt_sort[]
it_outtab = gt_outtab[].
> Mantenere rihe marcate
PERFORM set_selected_rows TABLES gt_outtab.
&----
*& Form set_selected_rows
&----
FORM set_selected_rows TABLES pt_outtab STRUCTURE gt_outtab.
DATA lt_rows TYPE lvc_t_row.
DATA l_rows LIKE LINE OF lt_rows.
LOOP AT gt_outtab WHERE mark = 'X'.
l_rows-index = sy-tabix.
APPEND l_rows TO lt_rows.
ENDLOOP.
CALL METHOD grid->set_selected_rows
EXPORTING
it_index_rows = lt_rows.
ENDFORM. " set_selected_rows
anyway...thank you (i hope to talk with you in italian, next time...)
p.s. regards from m.cerdelli (ex amc), friends of luca maionchi
‎2008 Mar 19 3:12 PM
Hi
If you've solved your problem close this post, anyway you're right if you use the method set_table_for_first_display u need to call set_selected_rows after calling set_table_for_first_display, but this method should be called once, in the next step it should call the method for refresh.
Say bye bye to m.cerdelli
Max