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: 

Refresh selections in CL_SALV_TABLE

former_member214999
Participant
0 Kudos

Dear all,

I am using CL_SALV_TABLE to show my report.

Also using

gr_selections = gr_table->get_selections( ).

gr_selections->set_selection_mode( gr_selections->multiple ). for selecting row.

After showing the report, user can process some of the lines. When they click on refresh, processed lines are dissappering(working as required). problem is after refresh still the selctions are not cleared. (For exaple if the user selected 13 and 18 row, after refresh new 13 and 18 row's are still seleted).

Regards,

Eswar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try to implement the method SET_SELECTED_ROWS and set nothing has been selected after refresh.

When the REFRESH button is pressed, check whether the refresh button is pressed after the selected rows have been processed. if yes set as none of the rows selected by calling the method SET_SELECTED_ROWS.

Hope this helps. Rwd points if helpful.

Thanks

Balaji

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try to implement the method SET_SELECTED_ROWS and set nothing has been selected after refresh.

When the REFRESH button is pressed, check whether the refresh button is pressed after the selected rows have been processed. if yes set as none of the rows selected by calling the method SET_SELECTED_ROWS.

Hope this helps. Rwd points if helpful.

Thanks

Balaji

0 Kudos

May be try this way


  data: gr_selections type ref to cl_salv_selections,
        gt_rows       type salv_t_row.

  refresh : gt_rows. " clear out selections
  clear : gt_rows.

  gr_selections = gr_table->get_selections( ). 
  gr_selections->set_selected_rows( gt_rows ).

Former Member
0 Kudos

How were you able to get the refresh button to be displayed? I am using the same logic but the refresh button is not on the screen.