Skip to Content
0
Former Member
May 28, 2008 at 03:27 AM

Wht I need to pass for FILE and TEXT in 'FTP_R3_TO_SERVER'?

107 Views

Hi Experts,

In the follwoing FM, am getting SY-SUBRC as 0, so, am guessing my FTP connection is get success,

call function 'FTP_CONNECT'

EXPORTING

user = p_userID

password = g_password

host = p_host

rfc_destination = c_dest

IMPORTING

handle = g_dhdl

EXCEPTIONS

NOT_CONNECTED.

So, in next step, I am using the below FM for transferring the data from internal table to FTP Server.

CALL FUNCTION 'FTP_R3_TO_SERVER'

EXPORTING

HANDLE = g_dhdl, usually, its coming as 1

FNAME = 'c:\datafile.txt'

CHARACTER_MODE = 'X'

TABLES

TEXT = it_text "internal table with one field, where all data records were appendedEXCEPTIONS

TCPIP_ERROR = 1

COMMAND_ERROR = 2

DATA_ERROR = 3

OTHERS = 4.

Issues:

1) but, here, am getting TCPIP_ERROR = 1 error!! so, pls. let me know that, Wht does it mean? How can I rectify it?

2) If I change some parameters, etc,. some tmes am getting DATA_ERROR?

3) mainly, pls. let me know, Wht I have to pass for FNAME?

4) mainly, pls. let me know, Wht I have to pass for TEXT?