02-16-2009 3:06 PM
Hye techies,
Is it possible to upload an excel file into another hardisk of another system if i have the system ip.
When i am using the GUI_DOWNLOAD and giving the filename as '
172.26.2.236\C:\temp' it throws an error saying Error calling Data provider.
Please help.
Note: there is a ping response from my system to Application Server and Application server to the destination system.
Thanks,
Imran.
02-16-2009 3:11 PM
if '
172.26.2.236\C:\temp' is mapped to your server or to your system then GUI_Download should be able to download the file to server
02-16-2009 3:09 PM
Hi,
Use Open Dataset statements to upload to Application Server and then application server to the destination system.
Thanks,
sathish
02-16-2009 4:35 PM
Hye Satish,
How to download the file from application server to destination system.
The way it can be obtained is input using a dataset into an internal table and then use GUI_DOWNLOAD.
Again this will give a problem because it is not taking the destination path.
If this is not the procedure, please let me know the best approach.
Regards,
Imran.
02-16-2009 3:11 PM
if '
172.26.2.236\C:\temp' is mapped to your server or to your system then GUI_Download should be able to download the file to server
02-16-2009 4:36 PM
Hye JAY,
It is mapped but still the GUI_DOWNLOAD is not working, any other approach.
Thanks,
Imran.
02-16-2009 10:51 PM
Hi,
check ABAP help, command OPEN DATASET FOR OUTPUT, then TRANSFER. You can use GUI functions only if target location is visible from your presentation server. In your situation you need write to file from server, look to example.
* Write file to server
CONCATENATE dstpath file INTO lv_filename.
OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE.
CHECK sy-subrc = 0.
LOOP AT buffer.
DESCRIBE FIELD buffer-data LENGTH reclen IN TEXT MODE.
IF filelen > reclen.
filelen = filelen - reclen.
ELSE.
reclen = filelen.
ENDIF.
TRANSFER buffer TO lv_filename LENGTH reclen.
ENDLOOP.
CLOSE DATASET lv_filename.
Note, that you have to fill bufer with lines with structure:
A1 <tab> B1 <tab> ...
A2 <tab> ...
and result will be text file with .xls suffix, not native XLS format. But Excel will open your file as expected.
Regards,
Pavel