‎2007 Jan 23 10:10 AM
Hi
my internal table is
DATA: BEGIN OF IT_LFA1 OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF IT_LFA1.
i am displaying this table with REUSE_ALV_LIST_DISPLAY.
field catelog is like
F_WA_LFA1-FIELDNAME = 'LIFNR'.
F_WA_LFA1-TABNAME = 'IT_LFA1'.
F_WA_LFA1-SELTEXT_L = 'VENDOR NO'.
APPEND F_WA_LFA1 TO F_LFA1.
F_WA_LFA1-FIELDNAME = 'NAME1'.
F_WA_LFA1-TABNAME = 'IT_LFA1'.
F_WA_LFA1-SELTEXT_L = 'VENDOR NAME'.
APPEND F_WA_LFA1 TO F_LFA1.
Here only 10 characters of vendor name are displayed.
How to display the complete name lfa1-name1
I dont want take static lenth like
F_WA_LFA1-outputlen = <b>some fixed number</b>
rather;
F_WA_LFA1-outputlen = <b>length of it_lfa1-lifnr</b>
Regards,
MB
Message was edited by:
M B
‎2007 Jan 23 10:15 AM
Set the parameter COLWIDTH_OPTIMIZE in the layout structure to 'X'. The column width will be adjusted to the contents.
Manoj
‎2007 Jan 23 10:12 AM
Hi
U can force the output length:
F_WA_LFA1-FIELDNAME = 'NAME1'.
F_WA_LFA1-TABNAME = 'IT_LFA1'.
F_WA_LFA1-SELTEXT_L = 'VENDOR NAME'.
<b>F_WA_LFA1-OUTPUTLEN = 35. <----
</b>
APPEND F_WA_LFA1 TO F_LFA1.
Max
‎2007 Jan 23 10:14 AM
like this
fcat-fieldname = 'WA2'.
fcat-key = 'X'.
<b> fcat-outputlen = '40'.</b>
fcat-just = 'L'.
fcat-seltext_m = ' CNF-TECO'.
Regards
Prabhu
‎2007 Jan 23 10:13 AM
HI,
IF wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-col_pos = '1'.
<b> wa_fieldcat-outputlen = 20.</b> this will be the display length
MODIFY i_fieldcat FROM wa_fieldcat.
ENDIF.
‎2007 Jan 23 10:13 AM
‎2007 Jan 23 10:13 AM
‎2007 Jan 23 10:14 AM
DATA: BEGIN OF IT_LFA1 OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF IT_LFA1.
F_WA_LFA1-FIELDNAME = 'LIFNR'.
F_WA_LFA1-TABNAME = 'IT_LFA1'.
F_WA_LFA1-SELTEXT_L = 'VENDOR NO'.
APPEND F_WA_LFA1 TO F_LFA1.
F_WA_LFA1-FIELDNAME = 'NAME1'.
F_WA_LFA1-TABNAME = 'IT_LFA1'.
F_WA_LFA1-SELTEXT_L = 'VENDOR NAME'.
F_WA_LFA1-SELTEXT_M = 'VENDOR NAME'.
F_WA_LFA1-OUTPUTLEN = specify teh length of name1.
APPEND F_WA_LFA1 TO F_LFA1.Refer http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
Hope this helps.
‎2007 Jan 23 10:15 AM
Set the parameter COLWIDTH_OPTIMIZE in the layout structure to 'X'. The column width will be adjusted to the contents.
Manoj
‎2007 Jan 23 10:30 AM
Hi,
use <fieldcatalog>-colwidth_optimize = 'X'.this will optimize the length automatically depending on the text.