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

cl_salv_table: refresh on second grid does nothing

103343
Active Participant
0 Likes
905

Hello

I have two customcontainers on one dynpro, one at the left side of the dynpro, one at the right side. Each of it assigned with an ALV-grid of class cl_salv_table.

Now, when data in one grid is clicked, I change the number of rows in the other grid and call the refresh method( full ) for this second grid.

This works fine, when I click data in the left grid. New data appears in the right grid. But strangely, when clicking in the right grid, which should change data in the left one, nothing happens, the screen does not change.

Then, when I click a function at this second grid (for example get layout) the new data selection appears.

Is there any method to get the refresh work? The event at grid one ought to change data at grid two and refresh it on the screen.

Regards,

Herbert

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
795

Hi,

Try this

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 ).

Regards,

Raj.

5 REPLIES 5
Read only

Former Member
0 Likes
796

Hi,

Try this

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 ).

Regards,

Raj.

Read only

0 Likes
795

Hi,

I coded this, but it doesn't work. I did it before doing the refresh and as a second try after doing the refresh, but either did change anything.

Read only

0 Likes
795

Ok, I found it!

I accidentally left a 'LEAVE TO SCREEN...' in my handle_user_command. This seems to have destroyed something.

Now I removed this line and everything works fine.

Thanks

Herbert

Read only

0 Likes
795

Hi,

Thank you for sharing the solution. I've spent hours to figure out how to making the Refresh works but without success.

Best regards

LNC

Read only

Former Member
0 Likes
795

Hi,

refer to the standard examples giving bcalv