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 output !!!

Former Member
0 Likes
668

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
645

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

4 REPLIES 4
Read only

Former Member
0 Likes
645

Hi,

Try passing the outputlen = 100

v_afield-outputlen = 100.

Thanks,

Naren

Read only

Former Member
0 Likes
646

Set the colwidth_optimize option in layout and check.

ex:

g_layout-colwidth_optimize = 'X' .

Read only

Former Member
0 Likes
645

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

Read only

Former Member
0 Likes
645

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