05-29-2007 1:37 PM
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
11-16-2007 4:39 PM
11-17-2007 5:31 AM
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.
11-17-2007 5:43 AM
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