cancel
Showing results for 
Search instead for 
Did you mean: 

ALV table headers not changing, why?

vishal_boyro3
Explorer
0 Kudos

Hello everyone,

I am having a problem with ALV headers. The ALV is referenced to a DDIC structure for its internal table data and ALV take the standard description of the different data elements.

I tried to use the SET_TEXT method of the CL_SALV_WD_COLUMN_HEADER class (ofcourse after reading the header form the ALV config table) but the value aint changing on the display. When I debug the method the internal attribute TEXT of the object is correct set to my defined description but I dont see this updated value on the output.

Am I missing some refresh statements or something else?

Thank you for your advices,

Vishal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Instead of calling get_header on the column, you can use the create_header method and directly call set_text on the reference. It will work.

Regards,

Nithya

Former Member
0 Kudos

Hi Vishal,

try to do this:

Data:

lr_column TYPE REF TO cl_salv_wd_column,

lr_column_header TYPE REF TO cl_salv_wd_column_header.

lr_column->delete_header( ).

lr_column_header = lr_column->create_header( ).

lr_column_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none ).

lr_column_header->set_text( 'Your Text' ).

It should work

regards Christian

Former Member
0 Kudos

Hi Vishal,

As well as setting the new column header value, you also have to tell the ALV control to ignore the default data dictionary value

e.g.

lr_colhead->set_ddic_binding_field( '00' ).

(where lr_colhead is your column header object ref.)

Hope this solves it!

Mike