Skip to Content
author's profile photo Former Member
Former Member

change ALV column Header

Hello masters:

I have problems to change the column header that belongs to a dynamic ALV in a Web dynpro.

I'm using the next code to do that.

NOTE: I did the same to change the tooltip for the same column, and It´s working fine!!!

¿Does anybody know why this happen, and what do I have to do?

DATA: lr_cmdl TYPE REF TO cl_salv_wd_config_table,

lr_col TYPE REF TO cl_salv_wd_column,

lr_header TYPE REF TO cl_salv_wd_column_header.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

lo_interfacecontroller = wd_this->wd_cpifc_alv( ).

lr_cmdl = lo_interfacecontroller->get_model( ).

  • Set header texts

lr_col = lr_cmdl->if_salv_wd_column_settings~get_column( 'AMOUNT_2008' ).

lr_header = lr_col->get_header( ).

  • This doesn't change the column header ************

CALL METHOD lr_header->set_text


value = 'amount title'.

  • This last part work fine!!!!! *******************

CALL METHOD lr_header->set_tooltip


value = 'header tip'.

Edited by: Rodrigo Arenas Arriola on Jan 14, 2009 7:31 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 14, 2009 at 06:39 PM

    You have to be sure and clear the current text assignments first otherwise the data dictionary tests can override the tests you supply.

    l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
      data l_header type ref to cl_salv_wd_column_header.
      l_header = l_column->get_header( ).
        property =  if_salv_wd_c_ddic_binding=>bind_prop_text
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
      l_header->set_text( `Posting Date` ).

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 11:04 PM

    My friend, you're a great master!!!

    Thank you, problem solved...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.