2008 Dec 11 5:29 AM
Hi Experts ,
I have an ALV list with 15 fields.
There are some fields compressed when the output is displayed.
For ex ( Vendor only 6 characters are displayed .When I double click on the vendor column it gets expanded).
I want to display all the fields with full length by default ....
Is it possible?
Please suggest in this regard.
Thanks in advance.
BR,
Jaga.
2008 Dec 11 5:31 AM
HI,
In the Layout pass blank to cwidth_opt field. and in fieldcalalog set value for the OUTPUTLEN field.
2008 Dec 11 5:31 AM
HI,
In the Layout pass blank to cwidth_opt field. and in fieldcalalog set value for the OUTPUTLEN field.
2008 Dec 11 7:42 AM
Hi ,
After giving the output length I can view the fields.
Thanks for your valuable comments but when I go for print preview again the fields are compresssed.
Please help in this regard.
Thanks,
Jaga
2008 Dec 11 5:52 AM
Hi,
Make use of the below code :
gs_fieldcat-outputlen = ' ' "Length of the field.
Thanks,
Sriram POnna.
2008 Dec 11 7:44 AM
When i go for print preview the field compression is still there.
2008 Dec 11 9:20 AM
Hi jagadish,
You can set the output length in the fieldcat for that field.
for ex:
wa_fieldcat-outputlen = 200.
this will make your field upto 200 characters long
2008 Dec 11 9:23 AM
Hi Jagdish,
This may be a restriction ALV Grid puts. My recommendation will be that, split some fields and generate more than one rows with the same key (you should then add a new key field which will hold line numbers specific to one definite key). When you sort with ALV Grid's sort option the keys will vertically merged (if you do not turn off this feature via layout or field catalog settings). I know this is not so pretty but ALV is not intended to show that kind of stuff.
Regards
Flavya
2008 Dec 11 10:02 AM
example:
counter = counter + 1.
wa_fieldcat-col_pos = counter.
wa_fieldcat-fieldname = 'LIFNR'.
wa_fieldcat-tabname = 'I_DATA'.
wa_fieldcat-seltext_l = 'Vendor'.
wa_fieldcat-outputlen = 10.
wa_fieldcat-no_zero = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.