on 12-10-2008 7:50 PM
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
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'
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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').
Hi Anmol and Suman,
Thanks for all your help.
The issue has been resolved.
AS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.