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

SET_SELECTED_ROWS

Former Member
0 Likes
616

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
540

Hi

U should call that method before refreshing your output. Can you post the code where u call the method?

Max

3 REPLIES 3
Read only

Former Member
0 Likes
541

Hi

U should call that method before refreshing your output. Can you post the code where u call the method?

Max

Read only

0 Likes
540

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

Read only

0 Likes
540

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