09-18-2006 2:59 PM
I have an application that accepts input from an editor control, and then calls an ALV grid based on the input. The layout of the grid can change each time.
Each time I display the ALV grid screen, I call SET_TABLE_FOR_FIRST_DISPLAY. However, it never shows the updated structure, it only shows the original.
Any ideas on what to do to get it to display the new version? I can post a sample app demonstrating the problem, but it is 160 lines of code.
Thanks for any suggestions
09-18-2006 3:00 PM
Can you show your code to call to the SET_TABLE_FOR_FIRST_DISPLAY?
09-18-2006 3:10 PM
Thanks. Here is the code. Each time I clear the reference variables.
FORM create_alv_grid.
DATA: l_s_layout TYPE lvc_s_layo.
CLEAR: g_r_custom_container,
g_r_alv_grid.
PERFORM create_field_catalog.
PERFORM prepare_layout CHANGING l_s_layout.
CREATE OBJECT g_r_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT g_r_alv_grid
EXPORTING i_parent = g_r_custom_container.
CALL METHOD g_r_alv_grid->set_table_for_first_display
EXPORTING
is_layout = l_s_layout
i_bypassing_buffer = 'X'
CHANGING
it_outtab = <tab>
it_fieldcatalog = g_t_fcat.
ENDFORM."
09-18-2006 3:07 PM
Hi
Use this statement in the else condition with the refreshed data.
CALL METHOD gr_alvgrid->refresh_table_display.
gr_alvgrid is the name of the ALV grid.
Hope this is wht u are looking for.
Prashant