‎2008 Jun 19 5:32 AM
What is the maximum number of characters that a field in ALv can accomodate?
Please give me exact answer.
I have an internal table .In that one field contains approx 200 characters.I want to display it in ALv.Is it possible?
‎2008 Jun 19 5:34 AM
‎2008 Jun 19 5:35 AM
Hi,
It is possible. But the thing is set the layout's colwidth_optimize field to 'X'.
Regards,
Subramanian
‎2008 Jun 19 5:37 AM
Hi,
Yus it is possible,Maximum number of character is 255.
Thanks
Ankur Sharma
‎2008 Jun 19 6:06 AM
I am usin the folloeing code.Her itab-text contains 200 characters.But it is displaying only 120 characters rest are not displayed.Can nyone tell me the modification in my code?Full pgm can also post here...
REPORT ZTEST_MM4 .
type-pools:slis.
types:Begin of x_itab,
text type char200,
name type char20,
end of x_itab.
data:it_itab type standard table of x_itab,
t_fieldcat TYPE slis_t_fieldcat_alv, "Field catalog
w_itab type x_itab,
g_matnr type matnr.
w_itab-name = 'Madan'.
w_itab-text = 'This is long text contains 200 characters. This is only a test whether we can print this in ALV or not.This is for requirement PGSR649 report.Example of legacy report to understand where PO Long text will have to be printed. The layo'.
append w_itab to it_itab.
select-options:s_matnhr for g_matnr.
write:' something'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-cprog
I_STRUCTURE_NAME = 'ZTEST_MM4'
CHANGING
ct_fieldcat = t_fieldcat[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = space
i_callback_program = sy-repid
i_structure_name = 'ZTEST_MM4'
it_fieldcat = t_fieldcat
TABLES
t_outtab = it_itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE i022 WITH 'REUSE_ALV_GRID_DISPLAY Failed'(026).
LEAVE LIST-PROCESSING.
ENDIF.
‎2008 Jun 19 6:44 AM
Hi ,
define ur fieldcat in ths way
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
Thanks
Ankur Sharma