05-05-2006 9:56 AM
Hi All.
Is it possible to download a file to an FTP server i.e. a network path, in background?
I know in background, we can only use READ DATASET/ OPEN DATASET . But it can only download a file to application server. Can we download to FTP directly?
Thanks in adv.
05-05-2006 9:58 AM
Hi,
you could run an external command in the SAP server. The command to download is wget (it's a GPL software that run under M$ and Unix system).
Rgd
Frédéric
05-05-2006 9:58 AM
Hi,
you could run an external command in the SAP server. The command to download is wget (it's a GPL software that run under M$ and Unix system).
Rgd
Frédéric
05-05-2006 10:00 AM
05-05-2006 10:00 AM
sorry... but never done it before..
so could you please elaborate what you are saying?
a sample example would be of great help...
05-05-2006 10:11 AM
Hi,
We have done the other way around:
*Connect to the FTP server
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = 'ap\s-ftpsgacd'
password = l_v_pwd
host = 'pmipmftpaisdev.eu.pm.com'
rfc_destination = 'SAPFTPA'
IMPORTING
handle = v_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Get the folders inside the directory
*Execute the FTP Command
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = v_handle
command = fp_l_cmd
TABLES
data = fp_it_result
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
cheers
Aveek