2014 Oct 31 10:51 AM
Dear experts,
I try to set the width of one column in my fieldcatalog in this way:
CLEAR wa_field_catalog_detail.
wa_field_catalog_detail-fieldname = 'MAKTX'.
wa_field_catalog_detail-ref_field = 'MAKTX'.
wa_field_catalog_detail-ref_table = 'MAKT'.
wa_field_catalog_detail-outputlen = '40'.
wa_field_catalog_detail-scrtext_s = text-t09.
wa_field_catalog_detail-edit = abap_false.
APPEND wa_field_catalog_detail TO ta_field_catalog_detail.
But for some reason the column is onl that width as the description of it, but note 40 as I would like to have....
What could be a reason for it?
Thanks in advance!
Denis
2014 Oct 31 10:54 AM
Hi, Denis!
Haven't you used layout-colwidth_optimize (OR cwidth_opt - depending on what type of ALV you have) flag?
2014 Oct 31 10:54 AM
Hi, Denis!
Haven't you used layout-colwidth_optimize (OR cwidth_opt - depending on what type of ALV you have) flag?
2014 Oct 31 11:00 AM
Hi!
I did use:
wa_layout_detail-cwidth_opt = 'X'.
But the width is enough only for column title and not for column content
2014 Oct 31 11:18 AM
Hi! I've played with sample ALV and it seems that cwidth_opt overrides outputlen definition. Try to switch off cwidth_opt temporarily and test it.
2014 Oct 31 10:54 AM
Hello Denis,
I guess, if you set outputlen to 30, then it would only show the forst 30 characters. So I thinki it is about showing x characters and not the default width of the field.
Best regards,
Thomas Wagner
2014 Oct 31 12:06 PM