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

alv grid

Former Member
0 Likes
521

HI friends,

the data i want to populate is dynamic.

So can you tell me is there any way to optimize the column width dynamically

Iam using ALV oops.

HI friends,

the data i want to populate is dynamic.

So can you tell me is there any way to optimize the column width dynamically

Iam using ALV oops.

3 REPLIES 3
Read only

Former Member
0 Likes
481

Hai premraj

do u want to optimise col width from with in the program, then

1. declare a work area of type lvc_s_layo,

wa_layo type lvc_s_layo.

2. assign value to cwidth_opt.

wa_layo-cwidth_opt = 'x'.

3. in the set_table_for_first_display pass this wa_layo as parameter.

call object->set_table_for_first_display

exporting

is_layout = wa_layo

remaining part is all same.

Read only

Former Member
0 Likes
481

Hi,

There is field colwidth_optimize in the structure IS_LAYOUT.

Set this field value to 'X'. (colwidth_optimize = 'X').

wa_layout-colwidth_optimize = 'X'.

and pass the layout to the FM

*Reward points

Regards

Read only

Former Member
0 Likes
481

hi,

create a internal table of type slis_t_filedcatalog_merge

work area for same table.

In that there is field colwidth_optimize in the structure IS_LAYOUT.

Set this field value to 'X'. (colwidth_optimize = 'X').

wa_layout-colwidth_optimize = 'X'.

append wa_layout to it_fldcat.

and use in reuse_alv_grid_dispaly fm.

if helpful reward some points.

with regards,

suresh.