on 01-26-2007 2:40 PM
Hello,
I am using an ALV and have 2 problems with the settings of the text from header and tooltip of a column. I set the texts with following code:
lr_column = l_value->if_salv_wd_column_settings~get_column( 'XY').
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( 'Head text.' ).
lr_column_header->set_tooltip( 'Tooltip text' ).
But than I have the problem that this don't overwrite the text bind from the DDIC of the column. So I change the code:
delete: lr_column_header = lr_column->get_header( ).
new: lr_column->delete_header( ).
lr_column_header = lr_column->create_header( ).
Than the text from header and tooltip are the new I set by programming.
Now I have the problem or better phenomenon, that in case of use:
if_salv_wd_table_settings~set_fixed_table_layout( 'X' )
the tooltip contains the text from the header plus the proper text of the tooltip!
I.e. like above set: "Head text Tooltip text" as the tooltip for the column XY.
It can't be right, or?
I cant find any help in the SDN or SAP notes.
We are now on the SAPKB70010.
Thanks or any help.
regards Christian
Solving this problem took me a while
DATA: col_header TYPE REF TO cl_salv_wd_column_header.
First disable dddic binding for textelements:
CALL METHOD col_header->set_ddic_binding_field
EXPORTING
value = IF_SALV_WD_C_DDIC_BINDING=>DDIC_BIND_NONE.
Afterwards you can set your own text. If you do not disable ddic binding
you can set your set as long as you like you will be ****.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian
You can either specify a new DDIC data element whose field label is to be used as the column header or you can set your own text without DDIC reference.
1. You use the SET_DDIC_BINDING_FIELD method to set the field label that you want to use for your column title. If you want to use your own text without DDIC reference as column title, you have to set this characteristic to DDIC_BIND_NONE.
lr_column = l_value->if_salv_wd_column_settings~get_column( 'XY').
lr_column_header = lr_column->get_header( ).
lr_column_header->SET_DDIC_BINDING_FIELD(DDIC_BIND_NONE).
lr_column_header->set_text( 'Head text.' ).
lr_column_header->set_tooltip( 'Tooltip text' ).
2. For specifying new DDIC data element
A DDIC data element can contain the following field labels:
Header
Short text
Medium-length text
Long text
To set a particular field label specify any of the below parameters in the SET_DDIC_BINDING_FIELD method.
Field label Constant
No field label DDIC_BIND_NONE
Header DDIC_BIND_TITLE
Short text DDIC_BIND_SHORT
Medium-length text DDIC_BIND_MEDIUM
Long text DDIC_BIND_LONG
Hope it Helps
Regards
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rakesh,
thanks for very helpfull answer.
But one problem is still there. In both cases the text of the tooltip contain the text of the header!?!!
> in case of use:
> if_salv_wd_table_settings~set_fixed_table_layout( 'X' )
> the tooltip contains the text from the header plus the proper text of the tooltip!
> I.e. like above set: "Head text Tooltip text" as the tooltip for the column XY.
Is there an interface where I have to set an attribute for the tooltip?
Regards
Christian
Thanks for your prompt answer.
In the use of
lr_column_header->SET_DDIC_BINDING_ELEMENT( 'Name of DDIC Element' ).
It is still the same!
I also tried 'DDIC_BIND_NONE' also with the same result. In all cases the text of header and tooltip are add together in the tooltip.
But only in case of fix set table layout.
l_value->if_salv_wd_table_settings~set_fixed_table_layout( 'X' ).
Any other suggestions?
Regards
Christian
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
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.