2007 Apr 03 6:19 AM
Hi guys,
I have a requirement such that i want to display a field in ALV report which is 100 chars long but the header of the field is "SE Long Text", as you can see that the header is 12 chars long hence in ALV output only 12 chars of this field are shown but i want to see all the chars i.e if its 60 chars long then the output length should be 60 or else if the field's value is 100 chars then the output length should be 100 chars...
the code that i am using is :-
v_afield-col_pos = 8.
v_afield-fieldname = 'TEXT'.
v_afield-seltext_l = 'SE Long Text'.
append v_afield to v_fieldcat.
.
.
.
.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
IT_FIELDCAT = v_fieldcat
tables
t_outtab = i_essr_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS
i_essr_final is the internal table which has the components that are to be displayed.
Please help.
Thanks
Rahul
2007 Apr 03 6:24 AM
Set the colwidth_optimize option in layout and check.
ex:
g_layout-colwidth_optimize = 'X' .
Hi guys,
I have a requirement such that i want to display a field in ALV report which is 100 chars long but the header of the field is "SE Long Text", as you can see that the header is 12 chars long hence in ALV output only 12 chars of this field are shown but i want to see all the chars i.e if its 60 chars long then the output length should be 60 or else if the field's value is 100 chars then the output length should be 100 chars...
the code that i am using is :-
v_afield-col_pos = 8.
v_afield-fieldname = 'TEXT'.
v_afield-seltext_l = 'SE Long Text'.
append v_afield to v_fieldcat.
.
.
.
.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
IT_FIELDCAT = v_fieldcat
tables
t_outtab = i_essr_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS
i_essr_final is the internal table which has the components that are to be displayed.
Please help.
Thanks
Rahul
2007 Apr 03 6:22 AM
Hi,
Try passing the outputlen = 100
v_afield-outputlen = 100.
Thanks,
Naren
2007 Apr 03 6:24 AM
Set the colwidth_optimize option in layout and check.
ex:
g_layout-colwidth_optimize = 'X' .
2007 Apr 03 6:24 AM
Hi
Y dont u make 'SE Long Text' 100 char instead of 12 char in ur prog or else u can also use the option of outputlen of fieldcatalog.
Hope this helps
REgds
Seema
2007 Apr 03 6:29 AM
Hi..,
u can use the Output length option for this..
Change ur code as...
v_afield-col_pos = 8.
v_afield-fieldname = 'TEXT'.
v_afield-seltext_l = 'SE Long Text'.
<b>v_afield-ouputlen = 100.</b>
append v_afield to v_fieldcat.
.
.
.
.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
IT_FIELDCAT = v_fieldcat
tables
t_outtab = i_essr_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS
reward all helpful answers,
sai ramesh
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |