Application Development 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: 

ALV Grid & Column Width doesn't work

marcela_martinez
Participant
0 Kudos

Hi everybody!

I have an ALG Grid in which I set column width value at field catalogue, and also set column width optimize at layout structure. But in spite of all it doesn't work. I have a few columns that are showing a half of its value. Am I missing something or adding anything that I don't need?

Here I stick a piece of my catalogue update:


        gs_fldcat-outputlen = 5.
        gs_fldcat-key = 'X'
        gs_fldcat-seltext_s    = text-018.
        gs_fldcat-seltext_m    = text-018.
        gs_fldcat-seltext_l    = text-018.
        gs_fldcat-reptext_ddic = text-018.

I look at other threads but I couldn't find the answer or may be I didn't reach to the correct one.

Thanks for reading.

Kind regards,

MM.

5 REPLIES 5

former_member589029
Active Contributor
0 Kudos

It looks like the output length from the fieldcat overrides the optimize setting in the layout, did you try commenting out the output length in the fieldcat and use the optimize only?

Regards,

Michael

0 Kudos

Thanks Michael for the answer. I have tried what you suggest before but it doesn't work.

Kind regards,

Marce.

0 Kudos

I am on ECC 6.0 using the OO ALV (class cl_gui_alv_grid).

I have one column with text which I set to 50 char => ALV displays 50.

I comment out the outputlen in the fieldcat (field is empty) => ALV displays 10 characters

I set the ls_layout-cwidth_opt = 'X' => ALV displays the full text width

Regards,

Michael

Former Member
0 Kudos

Hello dear

try to use this i think u will get the solution

DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.

LAYOUT-COLWIDTH_OPTIMIZE = 'X'.

thanx aryan

0 Kudos

Hello Aryan,

As I post before, I set the layout too.

Thanks & kind regards,

Marce.