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 Fieldcat

Former Member
0 Likes
1,096

Hi,

i have a button in the toolbar to refresh the data.

I use

CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY

EXCEPTIONS

FINISHED = 1

OTHERS = 2.

Is there a method to refresh the fieldcat?

When i press refresh i will read the actual data from database. This works!

But i update the fieldcat-table by setting 2 field with NO_OUT, but the fields

are allways shown. How can i set the output with the refreshed fieldcat.

Using ALV-OO.

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
781

Hi

Try to use the method SET_FRONTEND_FIELDCATALOG

Max

6 REPLIES 6
Read only

Former Member
0 Likes
781

Hi Dieter,

If alvgrid is initial.
perform prepare_fieldcat using OUT....
Perform call_alv_grid_display.

else.
refresh gt_fieldcatalog.
perform prepare_fieldcat using NO_OUT....
Perform refresh_table_display.

endif.

Best regards,

Prashant

Read only

0 Likes
781

Hi,

can you show what are you doing in

Perform call_alv_grid_display

(GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY??)

and

Perform refresh_table_display.

Regards, Dieter

Read only

Former Member
0 Likes
782

Hi

Try to use the method SET_FRONTEND_FIELDCATALOG

Max

Read only

Former Member
0 Likes
781

Hi,

Try using below code.

this might help you.

rs_selfield type slis_selfield.

S_SELFIELD-REFRESH = 'X' .

This will update the processed data on screen.

Best Regards,

Deepa Kulkarni

Read only

Former Member
0 Likes
781

Hi Dieter,

If gr_alvgrid is initial.
perform prepare_fieldcat using OUT....
Perform call_alv_grid_display. " GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
 
else.
refresh gt_fieldcatalog.
perform prepare_fieldcat using NO_OUT....
Perform refresh_table_display. " gr_alvgrid=>refresh_table_display.
endif.

Best regards,

Prashant

Read only

Former Member
0 Likes
781

Hi,

thanks max this solved my problem.

i used:

CALL METHOD GR_ALVGRID->SET_FRONTEND_FIELDCATALOG

EXPORTING

IT_FIELDCATALOG = GT_FIELDCAT.

*

CALL METHOD GR_ALVGRID->SET_FRONTEND_LAYOUT

EXPORTING

IS_LAYOUT = GS_LAYOUT.

*

i set the layout too.

Regards, Dieter