06-30-2010 3:48 PM
Hello experts,
I have a question about FTP data transfers. I'm using FTP_R3_TO_SERVER function to transfer data. But it sends the data in UTF-8 format. I'm wondering if it's possible to send the data in ANSI format.
Thanks in advance
Emre
07-01-2010 4:01 PM
I need an immediate solution and need your help.
Thanks...
Edited by: emrearman on Jul 6, 2010 4:34 PM
07-01-2010 4:01 PM
I need an immediate solution and need your help.
Thanks...
Edited by: emrearman on Jul 6, 2010 4:34 PM
07-07-2010 6:32 AM
Hi emrearman
There are few standard programs for FTP, check those you will get solution.
RSFTP001 to RSFTP011.
Regards,
Sri
07-06-2010 6:21 PM
Hello dear emrearman,
I had the same request and i used two Functions the first one connects you to the FTP server and the second will execute commands:
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = ftpuser
password = ftppwd
host = ftphost
rfc_destination = rfcdest
IMPORTING
handle = v_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
this will position you in the your directory - source directory:
CONCATENATE 'cd yourUnixDirectory/' INTO v_command.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = v_handle
command = v_command
compress = 'O'
VERIFY =
RFC_DESTINATION =
IMPORTING
FILESIZE =
FILEDATE =
FILETIME =
TABLES
data = t_out
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4
.
this will position you in the destination directory :
CONCATENATE 'lcd' v_dir INTO v_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = v_handle
command = v_command
compress = 'O'
VERIFY =
RFC_DESTINATION =
IMPORTING
FILESIZE =
FILEDATE =
FILETIME =
TABLES
data = t_out
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4
.
last call to transfert the file
CONCATENATE 'put' YourFile INTO v_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = v_handle
command = v_command
compress = 'O'
VERIFY =
RFC_DESTINATION =
IMPORTING
FILESIZE =
FILEDATE =
FILETIME =
TABLES
data = t_out
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4
I hope that it was helpful for you.
Yassine NEJMY