Hello,
I have a grid with a preset layut (variant). gs_variant is filled correctly. but i also change the feldcat like this
FORM change_fcat_0200.
FIELD-SYMBOLS : <fs_fieldcat> TYPE lvc_s_fcat.
LOOP AT g_t_alv_fieldcat_0200_sr ASSIGNING <fs_fieldcat>.
CASE <fs_fieldcat>-fieldname.
WHEN 'MAKTX'.
<fs_fieldcat>-col_opt = 'X'.
WHEN 'MENGE' OR 'SPEME'.
<fs_fieldcat>-outputlen = 10.
WHEN 'MJAHR' OR 'MEINS'.
<fs_fieldcat>-outputlen = 5.
WHEN 'NO_LIFNR'.
<fs_fieldcat>-outputlen = 11.
<fs_fieldcat>-just = 'C'. "Ausrichtung = centered
WHEN 'ERROR_RB_CREATION'.
<fs_fieldcat>-checkbox = 'X'.
<fs_fieldcat>-outputlen = 10.
WHEN 'MESSAGE'.
<fs_fieldcat>-outputlen = 100.
WHEN 'EBELN' OR 'VBELN' OR 'MBLNR'.
<fs_fieldcat>-hotspot = 'X'.
WHEN 'MSR_ID' OR 'MSR_ITEM' OR 'MSR_SPLIT_ID'.
"spalte nicht ausgeben
<fs_fieldcat>-no_out = 'X'.
ENDCASE.
ENDLOOP.
g_o_alv_grid_0200_sr->set_frontend_fieldcatalog( it_fieldcatalog = g_t_alv_fieldcat_0200_sr ).
g_o_alv_grid_0200_sr->refresh_table_display( ).
ENDFORM. "change_fcat_0200
This change of the fieldcat changes the preset variant. in other words the settings are lost. when i remove:
WHEN 'MSR_ID' OR 'MSR_ITEM' OR 'MSR_SPLIT_ID'.
"spalte nicht ausgeben
<fs_fieldcat>-no_out = 'X'.
behaviour does NOT change.
If i use the "layout" button and klick "load layout" and select the standard preset layout everything works fine.
any ideas?