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 column width

martin_svik2
Participant
0 Likes
1,636

Hello,

i am using class cl_gui_alv_grid for displaying an ALV. I have set layout parameter cwidth_opt = 'X'. So far, so good, BUT: for specific columns i want to set an fixed length, e.h. 50 for a text, field, etc... So what have i done in fieldcatalog. I set the outputlen to 50 and the field col_opt to blank.

But the result is that the field has NO length of 50 and it has column is still optimized (see yellow marked field):

Any idea for this behaviour ? 😞

br Martin

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,258

If you don't want to calculate automatically the width of ALL columns, I think you need to keep cwidth_opt = ' ', and set one by one col_opt = 'A' or 'X' (depends if you want to reset column width after soft refresh) for each column.