Skip to Content
0
Former Member
Aug 03, 2006 at 04:38 PM

Send file from application server to ftp server

1249 Views

Dear Sirs, we have to send a text file from our sap application server (45B on unix) to a ftp server on windows.

1)First we try to use the FTP_R3_TO_SERVER like this:

call function 'FTP_R3_TO_SERVER'

exporting

handle = g_handle

fname = p_file

blob_length = l_blob_lenght

tables

blob = pt_file

exceptions

tcpip_error = 1

command_error = 2

data_error = 3

others = 4

Where pt_file is a internal table filled with content of

the file declared like this:

data: begin of it_file occurs 0,

rec(80),

end of it_file.

The files arrives on the destination, but is empty.

2)After we try to use the FTP_COMMAND like the RSFTP002 program, but our source file is on application server so my command is like this

put /usr/sap/D41/SYS/global/abc.txt

The command runs but the log displays

"The system cannot find the path specified".

Notice that FTP_CONNECT

and other ftp commands like cd <dir> works well.

Have you some to suggest ?

Best Regards.

Riccardo Galli