Skip to Content

Changing column heading text in ALV

Hi,

I am using below code to change the heading of the column in ALV by default column heading text is coming form data element texts.

DATA:
  lob_column TYPE REF TO cl_salv_wd_column,
  lob_col_header TYPE REF TO cl_salv_wd_column_header.

    lob_column = go_model->if_salv_wd_column_settings~get_column( 'SCENARIO' ).
    lob_column->set_position( 2 ).
    lob_col_header = lob_column->get_header( ).
    lob_col_header->set_text( value = 'My Text' ).

still the default text is coming, not the custom one which i have given.

please suggest

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 24, 2011 at 01:25 PM

    You have to first remove the default text as well.

    lob_col_header->set_prop_ddic_binding_field(
        property =  if_salv_wd_c_ddic_binding=>bind_prop_text
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).

    Add comment
    10|10000 characters needed characters exceeded