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

Refresh data in ALV OM

Former Member
0 Likes
1,020

I am using CL_SALV_TABLE to generate ALV report with a refresh button.

When I click on Refresh button, the data should be updated

In the on_user_command event I have

perform select_data
my_alv->refresh( ).

But this does not seem to accomplish the task. What am I missing? Thank you.

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
971

Try to call display again


perform select_data
my_alv->refresh( ).
my_alv->display( ). " <<--

I am using CL_SALV_TABLE to generate ALV report with a refresh button.

When I click on Refresh button, the data should be updated

In the on_user_command event I have

perform select_data
my_alv->refresh( ).

But this does not seem to accomplish the task. What am I missing? Thank you.

6 REPLIES 6
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
971

Hi,

Refer:-

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
971

But I am already doing that. I am extracting the data again before calling refresh().

Read only

former_member194669
Active Contributor
0 Likes
972

Try to call display again


perform select_data
my_alv->refresh( ).
my_alv->display( ). " <<--

Read only

0 Likes
971

Actually just calling my_alv->display() does not do it. But if I perform display_list which contains all the display components, the report does get updated.

But why do I have to call display() again. When I look at demo program SALV_DEMO_TABLE_REFRESH, they do not call display() again. So even though this solution works, I am trying to understand why I have to implement display() again.

Edited by: Megan Flores on Aug 3, 2009 9:57 PM

Read only

0 Likes
971

Previously i have this issue while working with docking container, if i add a node in the left pan corresponding data will not refresh automatically in the right pan with ONLY using ->crefresh. Then i tried with ->refresh & ->display it works.

But i don't know the reason.

Read only

0 Likes
971

I was able to get it working. Thanks for that. I am not sure either why display() needs to be invoked again but as long as it works.

I have a bigger issue though and I have posted a separate ques for it, here it is. Would you be able to assist me on this one?

I am trying to print an ALV report that has far too many columns and so they get chopped off and dont print. Have you faced a similar issue?