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 data in ALV OO - URGENT

former_member680493
Participant
0 Kudos
412

Hi experts!

I'm doing an on line program that uses an ALV OO with a dinamic fieldcat..

When I use the method o_alv1->set_table_for_first_display the fieldcat has three colunms and I create a dinamic table with 3 colunms and no data... After this I set some options in my program that select the data I need and it can increase the number of colunms of my ALV OO... So I redo the fieldcat and and create a dinamic table with the colunms necessary...

I use the following code to refresh my ALV:

CALL METHOD cl_gui_cfw=>flush.

CALL METHOD o_alv1->set_frontend_fieldcatalog

EXPORTING

it_fieldcatalog = t_fieldcat1.

CALL METHOD o_alv1->refresh_table_display.

SET SCREEN 0.

LEAVE SCREEN.

My problem is when I back to the ALV screen the colunms are right but the data does not appear!

My table is a <fs_data> type standard table.

Can Anyone Help me???

Thanks in advance!

Gabriel

2 REPLIES 2

Former Member
0 Kudos
75

hi,

In ALV, to refresh the table you have to call the method "refresh_table_display".

It has the syntax very similar to creating the table.

It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)

or

if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).

the synatx is :-

call method grid (name of grid )->refresh_table_display

exporting

IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)

I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).

regards,

venkat.

former_member194669
Active Contributor
0 Kudos
75

Have you checked this?


CALL METHOD o_alv1->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = t_fieldcat1[].  "<< Put []

call method o_alv1->refresh_table_display
             exporting is_stable = <fs_data>[]. "<<<