Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

ALV Grid: dynamic/new fields by default hidden when using a layout

Former Member
0 Kudos


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,



Active Contributor
0 Kudos

May be u can try this way.

  call method g_grid->get_frontend_fieldcatalog
        et_fieldcatalog = gt_fieldcat[].
    perform f_rebuild_fieldcat changing gt_fieldcat. " Here u rebuild ur field catalog
    call method g_grid->set_frontend_fieldcatalog
        it_fieldcatalog = gt_fieldcat[].

    call method g_grid->set_frontend_layout
        is_layout = gs_layout.

    call method g_grid->refresh_table_display.

Former Member
0 Kudos

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?