‎2008 Mar 10 10:36 AM
HI,
IS there a way to fix the width of ca loumns in ALV even while displaying vertical seperators,
Regards,
Tarun Bahal
‎2008 Mar 10 11:20 AM
‎2008 Mar 10 11:22 AM
Hi,
use
wa_layout-colwidth_optimize = 'X'.
this will adjust the output according to the data
‎2008 Mar 10 1:14 PM
Hi Tarun,
TO fix the column length,
you need to select the field
if gs_fieldcat-fieldname = 'ERDAT'
GS_FIELDCAT-OUTPUTLEN = '9'.
modify gt_fieldcat from gs_fieldcat.
endif.
As though ERDAT length is 10 characters,but ot remove the blank spaces
give the outputlength to be 9 .
It will show only that length.
Regards,
‎2008 Mar 10 2:44 PM
with all these options ..............user can still change the column width manually...
Regards,
Tarun Bahal
‎2008 Mar 11 10:44 AM
hi,
there is no way to freeze column...
u can optimize its width but user can always change its width...
‎2016 May 23 11:33 AM
Hi, Dears.
I want to inform that it is possible to fix the width of columns in ALV.
It is necessary to create new class <lcl_my_grid > inheriting from cl_gui_alv_grid.
In this new class you should create method set_no_resize.
METHOD set_no_resize.
CALL METHOD me->set_resize_cols
EXPORTING
enable = 0
EXCEPTIONS
error = 1
OTHERS = 2.
ENDMETHOD.
Call this method to prevent the user to change the column size.
You can find more information here