Skip to Content
Former Member
Apr 23, 2007 at 06:14 PM

SALV_WD_TABLE Column name problem??



In my WDA View, i am using SALV_WD_TABLE Component. By default, when i am running this application, i am getting the Short version of Field Label declared inside Data Element which i don't want. So, inside the WDDOINIT method i wrote the following code:

method wddoinit.
data lr_cmp_usage     type ref to if_wd_component_usage.
  data lr_if_controller type ref to iwci_salv_wd_table.
  data lr_cmdl          type ref to cl_salv_wd_config_table.
  data lr_col           type ref to cl_salv_wd_column.
  data lr_header        type ref to cl_salv_wd_column_header.

*--- Instantiate ALV component
  lr_cmp_usage =   wd_this->wd_cpuse_usage_alv( ).
  if lr_cmp_usage->has_active_component( ) is initial.
    lr_cmp_usage->create_component( ).

*--- Get reference to model
  lr_if_controller =   wd_this->wd_cpifc_usage_alv( ).
  lr_cmdl          = lr_if_controller->get_model( ).

*--- Set tooltip of column header
  lr_col = lr_cmdl->if_salv_wd_column_settings~get_column( 'FNAME' ).
  lr_header = lr_col->get_header( ).
  lr_header->set_text( exporting value = 'First Name' ).

When i run my application i still see the column name as FNAME and not First Name. Is anything wrong with the above code?

And, is it possible to forcefully display Medium or Long version of Field Label directly from Data Element? Thanks.