02-06-2008 3:21 PM
Hi,
I have an ALV Grid whose field catalog partially contains dynamically generated fields (i.e. columns) like "_200802" for months.
Furthermore, I have set a default layout to enforce an excel inplace view with a specific template.
However, it seems that all dynamic columns that were not present at the time the layout was saved, are automatically hidden and have to be "unhidden" manually. Whenever a "new" month is to be displayed, it is hidden.
Is there a way either to declare field catalog entries as obligatory (i.e. a quasi opposite of NO_OUT) or tell the stored layout to change its behavior regarding unknown columns?
A possible workaround might be to call the set_frontend_fieldcatalog at an appropriate event after the initial grid creation..?
Thanks for your ideas,
David
02-06-2008 7:02 PM
May be u can try this way.
call method g_grid->get_frontend_fieldcatalog
importing
et_fieldcatalog = gt_fieldcat[].
perform f_rebuild_fieldcat changing gt_fieldcat. " Here u rebuild ur field catalog
call method g_grid->set_frontend_fieldcatalog
exporting
it_fieldcatalog = gt_fieldcat[].
call method g_grid->set_frontend_layout
exporting
is_layout = gs_layout.
call method g_grid->refresh_table_display.
a®
02-07-2008 11:39 AM
Thanks, this was pretty much what I was thinking about as a workaround. However, I am still wondering whether there is a way to change the grid behavior regarding this issue.
Should I just insert this code after the initial grid call or is there a suitable event that I could use?