on 09-22-2011 3:17 PM
Hi gurus,
Let see I can explain my issue.
I have an ALV with 20 fields, I have put scrolling for 5 columns, to first two ones are frozen. I have set 150px as width for each column. Scrolling is working fine but when I reach the final scroll I can't see the LAST COLUMN (FIELD20), I mean, the column doesn't have the proper width (150px), for the rest columns the width is appearing properly.
I copy my source code and a image link to more details:
DATA lo_column TYPE REF TO cl_salv_wd_column.
lo_column = lo_value->if_salv_wd_column_settings~get_column( 'FIELD' ).
lo_column->set_fixed_position( cl_wd_abstr_table_column=>e_fixed_position-left ).
*
lo_column = lo_value->if_salv_wd_column_settings~get_column( 'FIELD_OCULTO' ).
lo_column->set_fixed_position( cl_wd_abstr_table_column=>e_fixed_position-left ).
DATA: lt_columns TYPE salv_wd_t_column_ref,
ls_column TYPE salv_wd_s_column_ref.
CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
RECEIVING
value = lt_columns.
LOOP AT lt_columns INTO ls_column.
lo_column = lo_value->if_salv_wd_column_settings~get_column( ls_column-id ).
lo_column->set_width( '150PX' ).
ENDLOOP.
lo_value->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
* Cantidad de columnas que ocupan el scroll.
CALL METHOD lo_value->if_salv_wd_table_settings~set_first_visible_scroll_col
EXPORTING
value = 'FIELD'.
lo_value->if_salv_wd_table_settings~set_scrollable_col_count( 5 ).
[http://imageshack.us/photo/my-images/836/abap.jpg/]
Any idea?
Regards
Hi,
Try adding this:
DATA l_table TYPE REF TO cl_salv_wd_config_table.
l_table->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
In case this doesn't help, does the problem remain when you try changing the column width to, let's say, 75PX?
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.