on 09-19-2007 8:52 AM
Hi
I have created one alv report in WD4A. When I click on the "print version" button, the report appears in pdf format.
I want to create header on that pdf output. Please let me know how can i do that ? . it is coming on alv but not on pdf.
The code follows:
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_ztime( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_ztime( ).
DATA:
l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model(
).
*set header for the table
data: lr_table_settings type ref to if_salv_wd_table_settings.
data: lr_header type ref to CL_SALV_WD_HEADER.
lr_table_settings ?= l_value.
lr_header = lr_table_settings->get_header( ).
lr_header->set_text( 'ATTANDENCE LIST' ).
*PDF output header
data: pdf_header TYPE REF TO IF_SALV_WD_PDF_SETTINGS.
pdf_header ?= l_value.
data: lv_head type abap_bool.
call METHOD pdf_header->set_export_no_tol( 'X' ).
lv_head = pdf_header->get_export_no_tol( ).
regards
Vishal kapoor
Message was edited by:
vishal kapoor
closed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you're still having this problem, try this (given your own code sample):
data:
lv_header type string.
pdf_header ?= l_value .
CONCATENATE 'My header text' INTO lv_header RESPECTING BLANKS .
pdf_header->set_header_left_freetext( lv_header ).
pdf_header->set_header_left( if_salv_wd_c_pdf_settings=>text_free ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.