2008 Mar 24 5:58 PM
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
2008 Mar 24 6:46 PM
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.
2008 Mar 24 6:48 PM
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>[]. "<<<
a®