11-28-2008 7:42 AM
hi all,
I have some problems while trying to set the fix_column option of ALV grid and tree ... I set this value in catalogue, but it seems it doesn't work, so can anybody please post me a piece of code he/she knows it works because he/she used with success.
Thanks
Gabriele
01-03-2014 4:22 PM
I Know this quesiton is over 5 years old, but the question was never satisfactorily answered. Here's the answer; In order for FIX_COLUMN to work, ALL the columns to the left of the column you utimately want to prevent from scrolling horizontally must have their FIX_COLUMN fields set to 'X' (or, more appropriately, ABAP_TRUE) in the field catalog.
Cheers,
TerryB
11-28-2008 8:11 AM
Hi,
We need to pass this paramter to layout catalog, not to field catalog.
Regards,
Kumar
11-28-2008 8:13 AM
Hi,
In the layout Set wa_layout-colwidth_optimize = 'X'
Regards,
Nitin
11-28-2008 8:16 AM
>
> hi all,
> I have some problems while trying to set the fix_column option of ALV grid and tree ... I set this value in catalogue, but it seems it doesn't work, so can anybody please post me a piece of code he/she knows it works because he/she used with success.
> Thanks
> Gabriele
Please set the "KEY" field in the field catalog as 'X', by setting the value of KEY to 'X' the system will change the colour of the column and will not move the column while scrolling to the right. This option is generally used for the columnS on the extreme left, I don't know whether the column you want to fix is on the extreme left.
Edited by: Rajesh on Nov 28, 2008 1:47 PM
11-28-2008 2:14 PM
I try everything you said:
1) in layout the fix_column is not present
2) the optimization for column adjust width, but does not fix it
3) I try to set KEY for one field but again .. it doesn't work
Can anybody please post me some code about that that works surely ?
11-28-2008 2:17 PM
Hello,
Can you please paste the way you are building the fieldcatalog, also the code which you have used to display the ALV.
Thanks,
Jayant
11-28-2008 2:28 PM
wa_field_catalog-fieldname = 'IMPH'.
wa_field_catalog-coltext = 'Hardware Import'.
wa_field_catalog-fix_column = 'X'.
wa_field_catalog-key = 'X'.
APPEND wa_field_catalog TO it_field_catalog.
....
wa_layout-zebra = 'X'.
" set title for the ALV view
wa_layout-grid_title = 'local_table'.
" hide the name of each columns
* wa_layout-no_headers = 'X'.
" hide toolbar from the grid
* wa_layout-no_toolbar = 'X'.
" set selection mode
wa_layout-sel_mode = 'A'.
" optimize columns width
wa_layout-cwidth_opt = 'X'.
wa_layout-info_fname = 'COLOR'.
wa_layout-no_colexpd = 'X'.
The strange is that fix_column doesn't give error in catalogue ...
Regards
gabriele
Edited by: Gabriele Montori on Nov 28, 2008 3:28 PM
11-28-2008 2:40 PM
Hello,
FIX_COLUMN will never give you a error in fieldcatalog because in it defined in TYPE GROUP SLIS, under structure for slis_fieldcat_main0, which is used for fieldcalalog.
in your fieldcalalog
wa_field_catalog-col_pos = 1. --> Try to pass this also.
wa_field_catalog-fieldname = 'IMPH'.
wa_field_catalog-coltext = 'Hardware Import'.
wa_field_catalog-fix_column = 'X'.
wa_field_catalog-key = 'X'.
APPEND wa_field_catalog TO it_field_catalog.
Also in the layout pass: wa_layout-colwidth_optimize = 'X'
instead of wa_layout-cwidth_opt = 'X'.
Hope this helps.
Thanks,
Jayant
11-28-2008 2:45 PM
Hi,
Fix_column (fix column): This parameter is used to fix certain columns in the output. All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively.
Value set: SPACE, 'X'.
'X' = column fixed (does not scroll horizontally).
Thanks & Regards,
Krishna..
11-28-2008 3:48 PM
there are the setting I have for first column
...
wa_field_catalog-fix_column = 'X'.
wa_field_catalog-col_pos = 1.
wa_field_catalog-key = 'X'.
...
and still doesn't work ... if I change any other properties of layout or catalogue it works ... but fix column doesn't work:
02-16-2009 10:49 AM
04-12-2012 3:07 AM
Hi,
I'm having the same issue
CLEAR gs_fcat.
gs_fcat-fieldname = 'FLAG'.
gs_fcat-coltext = 'flg'.
gs_fcat-reptext = 'flg'.
gs_fcat-checkbox = 'X'.
gs_fcat-edit = 'X'.
gs_fcat-outputlen = 3.
gs_fcat-fix_column = 'X'.
gs_fcat-col_pos = lv_pos.
APPEND gs_fcat TO gt_fcat.
I am using REUSE_ALV_GRID_DISPLAY_LVC
seems abap is getting weird these days.
04-16-2012 3:50 PM
Hi
I tried to search but finally I gave up.. I don't think it's possible..
07-23-2015 12:22 PM
Its is possible . it is working for me
Set
wa_fieldcat-Key = 'X'.
wa_fieldcat-fix_column = 'X'.
and don't forget to clear the work area after append ,otherwise it will be set for all columns and it will not work.
Example
wa_fieldcat-fieldname = 'USER'.
wa_fieldcat-Key = 'X'.
wa_fieldcat-fix_column = 'X'.
wa_fieldcat-col_opt = 'X'.
wa_fieldcat-inttype = 'C'.
wa_fieldcat-coltext = 'USER'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
01-03-2014 4:22 PM
I Know this quesiton is over 5 years old, but the question was never satisfactorily answered. Here's the answer; In order for FIX_COLUMN to work, ALL the columns to the left of the column you utimately want to prevent from scrolling horizontally must have their FIX_COLUMN fields set to 'X' (or, more appropriately, ABAP_TRUE) in the field catalog.
Cheers,
TerryB
09-10-2015 6:27 PM
Hi Terry,
You are correct. But when we have more columns and when we want to prevent scrolling horizontally away fro the last column if we use fix_colum = 'X' for all the columns left to the last column. Then the scroll bar disappears. We will be not able to scroll at all.
Do you have any suggestions ?
Regards,
Dilip
09-10-2015 7:58 PM
The thread that never dies! Well, it makes sense that if you've fixed all the columns in the grid except the right-most column, then there's no scrolling allowed. Of course, if your output doesn't fit horizontally on one screen, that would be a problem. How about if you make that right-most column the LEFT-most column instead, and fix only that column? It seems to me that you are experiencing a "design" problem, not a technical problem.
Cheers,
TerryB
09-25-2015 9:01 AM
Hi Terry,
I tried the way you mentioned. But it did not worked. Any how we gave another solution to client.
Thank you.