Application Development 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: 

ALV grid: cannot see more than 128 char in a cell

Former Member
0 Kudos

Hi,

I store a comment field in an ALV grid with the width of 1000. However I can only see the first 128 characters; here is the field definition:

..............................

CLEAR s_fieldcat. "DV2K920819

s_fieldcat-tabname = 'I_PRPS'. "DV2K920819

s_fieldcat-fieldname = 'COMMENT'. "DV2K920819

s_fieldcat-datatype = 'CHAR'. "DV2K920819

s_fieldcat-outputlen = '1000'. "DV2K920819

s_fieldcat-seltext_l = 'Comment'. "DV2K920819

s_fieldcat-seltext_m = 'Comment'. "DV2K920819

s_fieldcat-seltext_s = 'Comment'. "DV2K920819

s_fieldcat-row_pos = '12'. "DV2K920819

s_fieldcat-just = 'L'. "DV2K920819

s_fieldcat-no_zero = 'X'. "DV2K920819

APPEND s_fieldcat TO gt_fieldcat."DV2K920819

............................................................................

DATA: BEGIN OF i_prps OCCURS 0,

....................

comment(1000) TYPE c, "DV2K920819

.................

DATA: END OF i_prps.

Is maybe the type 'CHAR' not suitable for a longer text? I need to accomodate 1000 characters in the comment field.

Thanks a lot,

Dinu

3 REPLIES 3

Former Member
0 Kudos

Pls refer SAP note 857823.It doesn't take more than 128 chars.

Former Member
0 Kudos

Hi

you can specify the output length of a column in the fieldcatalog by specifying this filed in your fieldcatalog slis_fieldcat-outputlen .

And also one parameter i.e. slis_layout_alv-colwidth_optimize ,if you put this parameter as 'X' then it will optimize the column width depending on the content of your column.

You need to set the OUTPUTLEN field in the feildcat, the field catalog is then passed to the ALV function call, or method call.

0 Kudos

Hello Dino,

If you enter a string or character of size 128 or more.The ALV grid will never display it.

Thanks and Regards,

Vasu