on 06-25-2007 10:00 PM
Hi Expert,
I have created Report using ALV component. The report displaying in the browser looks good. I need to display the Title of the report at the top of the report. Can you any body help me out from the requirement.
Thanks,
S Kumar
Hi,
You can use the following code to set the header for the ALV
data:
lr_table_settings type ref to if_salv_wd_table_settings,
lr_header type ref to cl_salv_wd_header.
lr_header = lr_table_settings->get_header( ).
call method lr_header->set_text
exporting
value = 'Test Alv Header' .
Regards,
Shruthi R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The error comes because, if you have copy pasted the code, table settings are not initialized.
You can directly access the table settings and get the header as follows:
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_alv_model = l_ref_interfacecontroller->get_model( ).
lr_header = l_alv_model->IF_SALV_WD_TABLE_SETTINGS~get_header( ).
Regards,
Nithya
hi,
this will sove ur problem:
l_ref_cmp_usage = wd_this->wd_cpuse_alv_material( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
l_ref_interfacecontroller = wd_this->wd_cpifc_alv_material( ).
l_value = l_ref_interfacecontroller->get_model(
).
lr_table_settings ?= l_value.
add this code and it will work
Madhu
<b>Please close the thread and award points if ur problem is solved</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can also use a caption or label element to set the header.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumar,
I prefer do to it the following way. I embed a report into a Group element and assign the title of the report to the Captions element that comes with the Group.
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 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.