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 Column Size

Former Member
0 Likes
503

Hi everybody,

im trying since hours now. How to get a column ov an ALV Grid to the size of the biggest entry, or to for example to show 400 characters.

I tried this allready:


DATA: alv_layout TYPE lvc_s_layo.

alv-layout-cwidth_opt = 'X'.

and this here:


DATA: alv_fcat TYPE lvc_t_fcat.

LOOP AT ch_alv_fcat ASSIGNING <curr_field>.
CASE <curr_field>-fieldname.

WHEN 'bla'.
  <curr_field>-outputlen = 300.
ENDCASE.

The field is an Char200.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

former_member787646
Contributor
0 Likes
472

Hi,

Try using UPPER CASE letters for field names and check.

Eg.

WHEN 'BLA'.

<curr_field>-outputlen = 300.

ENDCASE.

Hope it helps you.

Murthy

Hi everybody,

im trying since hours now. How to get a column ov an ALV Grid to the size of the biggest entry, or to for example to show 400 characters.

I tried this allready:


DATA: alv_layout TYPE lvc_s_layo.

alv-layout-cwidth_opt = 'X'.

and this here:


DATA: alv_fcat TYPE lvc_t_fcat.

LOOP AT ch_alv_fcat ASSIGNING <curr_field>.
CASE <curr_field>-fieldname.

WHEN 'bla'.
  <curr_field>-outputlen = 300.
ENDCASE.

The field is an Char200.

Thanks in advance.

2 REPLIES 2
Read only

former_member787646
Contributor
0 Likes
473

Hi,

Try using UPPER CASE letters for field names and check.

Eg.

WHEN 'BLA'.

<curr_field>-outputlen = 300.

ENDCASE.

Hope it helps you.

Murthy

Read only

0 Likes
472

I was to stupid i had a spelling problem :-/. The WHEN '...' was wrong so the outputlen was never set stupid.

greetings