cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro ALV title

Former Member
0 Kudos

Hi,

I have created a simple project with a view, a service call and ALV output.

The program now works fine except that I need to change the title of the ALV output such as:


Original title:

ID     No      Date   
...    ...     ...


Change to:

Employee ID            Employee Number           Strart Date   
    ...                    ...                       ...

How can I change the title? Where and how should I add the code?

Thanks,

AS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amit,

It is very simple use the below code to change the ALV title.

data: lo_value type ref to cl_salv_wd_config_table,

lo_header type ref to cl_salv_wd_header.

call method lo_value->if_salv_wd_table_settings~get_header

receiving

value = lo_header .

call method lo_header->set_text

exporting

value = 'ALV Header'

.

Former Member
0 Kudos

Hi Suman,

The code works great. I appreciate your help.

I actually want to change the titles of each column. Could you give me some advise?

Thanks,

AS

Former Member
0 Kudos

Hi

PLease do the following:

Open ALV application in se80

Under the application open the dropdown under views.

Double click on the ALV view

On the right hand side of screen goto the methods tab of the ALV view

open the method WDDOINIT and write the following code:

data: lcr_column_settings TYPE REF TO if_salv_wd_column_settings,

l_value TYPE REF TO cl_salv_wd_config_table,

lcr_column TYPE REF TO cl_salv_wd_column,

lcr_column_header TYPE REF TO cl_salv_wd_column_header.

lcr_column_settings ?= l_value.

lcr_column = lcr_column_settings->get_column( 'Your coloumn name or name of the field from the structure (Context) whose heading needs to be changed').

lcr_column->delete_header( ).

lcr_column_header = lcr_column->create_header( ).

lcr_column_header->set_text( 'New heading of the coloumn').

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anmol and Suman,

Thanks for all your help.

The issue has been resolved.

AS.