‎2008 May 05 10:11 AM
hi all,
i have an ALV report, while executing in background one of the field length is 40 but it is displaying till 15 only.
the field is ktext from aufk table.
the code is as below
loc_count = loc_count + 1.
ls_fieldcat-fieldname = 'KTEXT'.
ls_fieldcat-tabname = 'GT_LINE_ITEM1'.
ls_fieldcat-seltext_l = 'Int Order Descr'.
ls_fieldcat-outputlen = 40.
ls_fieldcat-col_pos = loc_count.
APPEND ls_fieldcat TO gt_fieldcat.
CLEAR ls_fieldcat.
please suggest how to get field length as 40 while executing in background.
thanks in advance.
‎2008 May 05 10:13 AM
‎2008 May 05 10:18 AM
hi ,
where do we need to pass this please help
layout-colwidth_optmize = 'X'.
‎2008 May 05 10:20 AM
HI,
like this.
TYPE-POOLS SLIS.
DATA:LAYOUT TYPE slis_layout_alv.
layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
TABLES
T_OUTTAB = ITAB.
rgds,
bharat.
‎2008 May 05 10:22 AM
Use databse tabname instead of internal table as shown.
loc_count = loc_count + 1.
ls_fieldcat-fieldname = 'KTEXT'.
ls_fieldcat-tabname = 'AUFK'.
ls_fieldcat-seltext_l = 'Int Order Descr'.
ls_fieldcat-outputlen = 40.
ls_fieldcat-col_pos = loc_count.
APPEND ls_fieldcat TO gt_fieldcat.
CLEAR ls_fieldcat.
Regards,
Anil.