‎2008 Jun 03 10:42 AM
how to change layout at runtime in ALV on click of any pushbutton or on click of layout button in the ALV
‎2008 Jun 03 11:12 AM
hi shweta,
try if this code can lead u smwhr,
have a set of fcats in various performs.
call that perform based on the selection screen input.
like this ..
dont forget to delete that layout which u hav created
if radio_1 = 'x'.
perform f_cat1.
elseif radio_2 = 'x'.
perform f_cat2.
endif.
form f_cat1. " fcats
srno
pernr
name
sex
endform.
form f_cat2.
srno
pernr
basic
hra
endform
reward if useful.
regards
srishti
‎2008 Jun 03 11:41 AM
i have some fields that are displayed on ALV .
i want to make a layout which will enable to add some additional fields other than the one displayed on ALV.
is ther any code for the same
‎2008 Jun 03 12:23 PM
Hi,
you have to click on button layout settings. But this option must be enabled with layout-edit = 'X'. Have a look at this coding:
gs_layout-edit = 'X'.
disvariant-report = 'ZTESTREPORT'.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ZTESTTAB'
is_layout = gs_layout
is_variant = disvariant
i_save = 'A'
CHANGING
it_outtab = t_testtab.
Hope it is helpful.
regards
Walter Habich