Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Transferring

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I need an immediate solution and need your help.

Thanks...

Edited by: emrearman on Jul 6, 2010 4:34 PM

3 REPLIES 3

Former Member
0 Kudos

I need an immediate solution and need your help.

Thanks...

Edited by: emrearman on Jul 6, 2010 4:34 PM

0 Kudos

Hi emrearman

There are few standard programs for FTP, check those you will get solution.

RSFTP001 to RSFTP011.

Regards,

Sri

Former Member
0 Kudos

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