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

layout at runtime

Former Member
0 Likes
487

how to change layout at runtime in ALV on click of any pushbutton or on click of layout button in the ALV

3 REPLIES 3
Read only

Former Member
0 Likes
446

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

Read only

Former Member
0 Likes
446

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

Read only

former_member435013
Active Participant
0 Likes
446

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