on 08-25-2008 9:55 AM
Hi folks,
unfortunately, I can't manage it to set a column name in WDA dynamically.
I tried it with the following code, but nothing happened. Any ideas what might be the point?
DATA lr_config TYPE REF TO cl_salv_wd_config_table.
DATA lr_column TYPE REF TO cl_salv_wd_column.
DATA lr_comp_if_alv TYPE REF TO iwci_salv_wd_table.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
data lr_column_header type REF TO cl_salv_wd_column_header.
lo_cmp_usage = wd_this->wd_cpuse_main_incidents( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lr_comp_if_alv = wd_this->wd_cpifc_main_incidents( ). " get component
lr_config = lr_comp_if_alv->get_model( ). " get cofig model
lr_column = lr_config->if_salv_wd_column_settings~get_column( 'My_Col' ).
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( 'My_Col_Name' ).
Kind regards, Steffen
Now I've found a solution.
Deleting the corresponding header column and create it afterwards and set the new text works!!!
[...]
lr_column = lr_column_settings->get_column( 'My_Col ).
lr_column->delete_header( ).
lr_column_header = lr_column->create_header( ).
lr_column_header->set_text( 'My_Col_header' ).
But I would assume that a single SET_TEXT should do the same.
Maybe anybody knows why not?
Regards, Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.