10-14-2015 4:50 AM
Hi Experts,
We are trying to download the AL11 data which is stored in the format of .xls to the local pc. It is being shown good in the AL11 and hence we need the same while downloading it as excel file. But some data is getting changed while downloading it as excel. For example, '#' in AL11 is getting changed to '<-5'. What could be done to have the data in proper format.
B.R.
10-14-2015 6:48 AM
10-14-2015 7:56 AM
10-14-2015 6:48 AM
Hi,
try to download with transaction CG3Y with BIN transfer format.
Br
Michael
10-14-2015 7:59 AM
10-14-2015 8:03 AM
In the ALV toolbar, there is an option for Excel, did you try with that?
10-14-2015 8:27 AM
10-14-2015 6:53 AM
Can you please tell me the steps, how you download the data into excel
List --> Export --> spreadsheet --> Excel office 2007 ?
10-14-2015 6:59 AM
there are number posts available in scn on the same topic.
refer to this How to download file from application server | SCN
10-14-2015 7:29 AM
10-14-2015 7:40 AM
Hi,
To Download the file directly from AL11 I would suggest this method
Hope this helps
10-14-2015 7:48 AM
10-14-2015 7:47 AM
Hi
First get the files from AL11 using
call function 'EPS_GET_DIRECTORY_LISTING'
exporting
dir_name = './'
importing
dir_name = lv_eps_dir
tables
dir_list = it_file_list
exceptions
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
others = 8.
if it_file_list[] is not initial.
delete it_file_list where name np '*.CSV'.
endif.
Then download the file using below logic
read table it_file_list index rs_selfield-tabindex.
if sy-subrc = 0.
w_filename = it_file_list-name.
concatenate './' w_filename into w_fnam.
lw_file = w_fnam.
translate lw_file to upper case.
open dataset lw_file in text mode encoding default for input
ignoring conversion errors.
if sy-subrc = 0.
do.
read dataset lw_file into wa_data.
if sy-subrc <> 0.
exit.
else.
while ( wa_data ne space ).
if wa_data eq space.
exit.
else.
append wa_data to it_data.
clear: wa_data.
endif.
endwhile.
endif.
enddo.
close dataset lw_file.
concatenate wa_fname '\' w_filename into filename.
call function 'GUI_DOWNLOAD'
exporting
filename = filename
tables
data_tab = it_data. "csv_converted_table.
if sy-subrc <> 0.
i = 1.
endif.
else.
message 'Unable to display this file' type 'I' display like 'E'.
endif.
Regards
Suganya
10-14-2015 7:58 AM
10-14-2015 9:06 AM
10-14-2015 9:52 AM
Hi,
you can try report 'CACS_FILE_COPY'
or FM 'ARCHIVFILE_SERVER_TO_CLIENT'
Br
Michael
10-14-2015 10:52 AM
10-14-2015 11:12 AM
As for the character issue, try downloading it with langauge specific codepage. This may solve your issue.
OR
If you want to download a file which is in AL11 directory, then you can simply use OPEN_DATASET.
Read the data set and close it. You can read the data stored in AL11 and download it in desired output.
Regards,
Swet Bhushan
10-14-2015 11:33 AM
Can you explain more on downloading with language specific code page as i am simply making use of standard system -> List -> Save -> Local File option.
10-14-2015 12:01 PM
To make the things more clear.
I am downloading a file from AL11 into notepad or excel.
In AL11, data looks like this.
But when we try to download into excel or word the data is getting changed,
In Excel
Further a digit 5 is getting appened in the beginning.
In notepad
What can be done so that the data will be exactly as it is in AL11.
PS: SAP System is 4.6C.
10-14-2015 12:11 PM
Hi P.D.
What says that what you're seeing in AL11 is actually what it there.
Special Characters can have an influence on what you see there.
Therefore...how is the data getting populated in AL11?
Regards
Arden