cancel
Showing results for 
Search instead for 
Did you mean: 

ALV - set_text in column header not working (or I'm doing something wrong)

Former Member
0 Kudos

In the WDDOINIT module of my view that contains the ALV, I have the code:

method wddoinit .

  data: l_ref_cmp_usage type ref to if_wd_component_usage,
        lr_column        type ref to cl_salv_wd_column,
        lr_column_header type ref to cl_salv_wd_column_header.

  l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
  if l_ref_cmp_usage->has_active_component( ) is initial.
    l_ref_cmp_usage->create_component( ).
  endif.

  data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
  l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
  data: l_value type ref to cl_salv_wd_config_table.

  l_value = l_ref_interfacecontroller->get_model( ).

  lr_column = l_value->if_salv_wd_column_settings~get_column( 'LASTDATE' ).
  lr_column_header = lr_column->get_header( ).
  data: l_column_text type string.
  l_column_text = 'Must Change By'.
  lr_column_header->set_text( l_column_text ).

endmethod.

The text in the column header does not change. It uses what is in the dictionary.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try setting the set_ddic_binding_field( '00' ).

Answers (0)