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 - line size...

Former Member
0 Likes
2,084

Hi,

I want to display text in the ALV, but I only get 129 characters...

I already changed the text field in fieldcat to an outputlength above 129, but that didn't help...

I read in the Forum that there is a restriction to 255 characters...

any suggestions?

TIA,

Sebastian

Hi,

I want to display text in the ALV, but I only get 129 characters...

I already changed the text field in fieldcat to an outputlength above 129, but that didn't help...

I read in the Forum that there is a restriction to 255 characters...

any suggestions?

TIA,

Sebastian

16 REPLIES 16
Read only

Former Member
0 Likes
1,856

i think you must set your layout like

is_layout-colwidth_optimize = ' '.

so you can set your colwidth size.

Read only

0 Likes
1,856

no this option adjusts the column to my (not fully shown) text...

thanks for your help

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,856

Hi Sebastian,

Check the lenght of the field ur trying to display in ALV .

Declare Field(255) type c .

Read only

0 Likes
1,856

doesn't work too...

there is still the restriction for 129 characters...

but the strange thing is that if I restrict it in the field catalogue to 100characters it shows 129c's too... don't know why but it's not a buffer issue...

Read only

0 Likes
1,856

Check these fields

CWIDTH_OPT

Reward points if this helps.

Regards

Meera

Read only

0 Likes
1,856

Have you set any report size in the REPORT Statement?

Remove that and check. Might help.

DD_OUTLEN - You use this field to specify the field output length for external display. This is only relevant to fields without reference to the Data Dictionary for which you want to modify the output using a conversion exit (see Using the Conversion Exit). The column width (field OUTPUTLEN of the field catalog) does not need to be identical to the output length for external display ( DD_OUTLEN ).

Reward points if this helps.

Regards

Meera

Read only

0 Likes
1,856

I have no line size in report statement...

and DD_OUTLEN is also not the problem...

thank you

Read only

0 Likes
1,856

@chandra:

there is only one layout button... for changing layout... but I cannot see size in there...

but the consistency check shows me 255 characters...

Read only

0 Likes
1,856

at the bottom checkout , there will be one textbox for that,

ok then debug and checkout the line-size , and forcefully change that to 255 an checkout if its woring

Message was edited by:

chandrasekhar jagarlamudi

Read only

Former Member
0 Likes
1,856

Hi,

Please paste the code of how you are populating the field catalog for the field that displays more than 129 characters..

Thanks,

Naren

Read only

Former Member
0 Likes
1,856

there will be one layout button in the application toolbar , click that an checkout if the length is set to 129 , change that to 255 an try out

Read only

Former Member
0 Likes
1,856

Hi,

Please check this example..

TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF wa_mara,

text TYPE CHAR200,

END OF wa_mara.

data: v_repid type syrepid.

v_repid = sy-repid.

DATA it_mara LIKE STANDARD TABLE OF wa_mara WITH HEADER LINE.

CONCATENATE '12345678890SDFADFSDAFASDFASDFASDFASDFSADFASDFSADF'

'22345678890SDFADFSDAFASDFASDFASDFASDFSADFASDFSADF'

'32345678890SDFADFSDAFASDFASDFASDFASDFSADFASDFSADF'

INTO IT_MARA-TEXT.

APPEND IT_MARA.

DATA: S_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

CLEAR: S_FIELDCAT.

S_FIELDCAT-COL_POS = '1'.

S_FIELDCAT-FIELDNAME = 'TEXT'.

S_FIELDCAT-TABNAME = 'IT_MARA'.

S_FIELDCAT-REF_TABNAME = 'ADMI_BUFFI'.

S_FIELDCAT-REF_FIELDNAME = 'URL'.

APPEND S_FIELDCAT TO GT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

it_fieldcat = gt_fieldcat

TABLES

t_outtab = it_mara.

Thanks,

Naren

Read only

0 Likes
1,856

naredran, have you checked your coding?

because I get 129 characters with this too... :-?

@chandra: it already has 255c's...

Read only

0 Likes
1,856

try with these options

1) in the layout wa_LAYOUT-NO_MIN_LINESIZE = 'X'

2) NEW-PAGE LINE-SIZE 255

Read only

0 Likes
1,856

@naren: list works, correct... but this already worked in my old ALV if I switch to the list instead of the grid...

@chandra: there isn't such a field in my layout...

NEW-PAGE did not solved the problem too

Read only

Former Member
0 Likes
1,856

Hi,

It is working if I use REUSE_ALV_LIST_DISPLAY..

TYPE-POOLS: slis.

DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF wa_mara,

text TYPE CHAR200,

END OF wa_mara.

data: v_repid type syrepid.

v_repid = sy-repid.

DATA it_mara LIKE STANDARD TABLE OF wa_mara WITH HEADER LINE.

CONCATENATE '40 - 12345678901234567890123456788901234567890'

'80 - A2345678901234567890123456788901234567890'

'120 - B2345678901234567890123456788901234567890'

'160 - C2345678901234567890123456788901234567890'

'200 - D2345678901234567890123456788901234567890'

INTO IT_MARA-TEXT.

APPEND IT_MARA.

DATA: S_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

CLEAR: S_FIELDCAT.

S_FIELDCAT-COL_POS = '1'.

S_FIELDCAT-FIELDNAME = 'TEXT'.

S_FIELDCAT-TABNAME = 'IT_MARA'.

S_FIELDCAT-REF_TABNAME = 'ADMI_BUFFI'.

S_FIELDCAT-REF_FIELDNAME = 'URL'.

S_FIELDCAT-OUTPUTLEN = '200'.

APPEND S_FIELDCAT TO GT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcat = gt_fieldcat

TABLES

t_outtab = it_mara.

Thanks,

Naren