Skip to Content
0
Dec 07, 2011 at 01:59 PM

How to read a layout variant for manual processing

2158 Views

Hello,

I have a custom ALV report program where the user can enter a layout variant, and this is reflected in the ALV:

DATA: l_layout TYPE disvariant.

PARAMETERS: p_layout TYPE slis_vari.

l_layout-variant  = p_layout.

CALL METHOD r_alv_grid->set_table_for_first_display
  EXPORTING
    is_variant      = l_layout
...

All very good. The program also outputs the table being sent to the ALV to an output file. The issue is that I only want to write the fields included in the layout variant to the output file... so how can I read the layout variant to find the fields that are included so I can add the required logic to my file export subroutine?

Thanks