05-29-2009 4:30 AM
Dear Friends,
1.When i try to download ALV report to excel it is not downloading the logo to the excel sheet.
2.I want my logo in the left side of the ALV.
Please suggest.
Thanks in advance
05-29-2009 5:01 AM
Hi Neliea,
What is the code snippet you have used i mean the Function Module for downloading
You can use thefollowing which does not pose any problem,
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = 'your file name with pathl'
filetype = 'BIN'
CHANGING
data_tab = internal table having data.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
* DATA_ENDING_AT = 54
* DATA_STARTING_AT = 5
filename = 'TESTFILE'
header_1 = header1
header_2 = header2
no_dialog = 'X'
no_start = ' '
n_att_cols = 6
n_hrz_keys = 1
n_vrt_keys = 4
sema_type = 'X'
* SO_TITLE = ' '
TABLES
data = t_sflight
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
As suggested by our friend Usnig SET GET CALL METHOD in OOPs you can very well solve your issue.
Revert for further clarification
Thanks and Regards
Srikanth.P
05-29-2009 4:44 AM
05-29-2009 5:01 AM
Hi Neliea,
What is the code snippet you have used i mean the Function Module for downloading
You can use thefollowing which does not pose any problem,
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = 'your file name with pathl'
filetype = 'BIN'
CHANGING
data_tab = internal table having data.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
* DATA_ENDING_AT = 54
* DATA_STARTING_AT = 5
filename = 'TESTFILE'
header_1 = header1
header_2 = header2
no_dialog = 'X'
no_start = ' '
n_att_cols = 6
n_hrz_keys = 1
n_vrt_keys = 4
sema_type = 'X'
* SO_TITLE = ' '
TABLES
data = t_sflight
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
As suggested by our friend Usnig SET GET CALL METHOD in OOPs you can very well solve your issue.
Revert for further clarification
Thanks and Regards
Srikanth.P
05-29-2009 5:25 AM
Hi,
try the following program.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = 'C:\file.XML'
filetype = 'BIN'
CHANGING
data_tab = lt_xml.
hope it will solve your problem.
Regards
Rajesh Kumar
11-02-2009 4:33 AM