2009 Oct 28 1:00 PM
Hi,
I have a problem with the function FTP_R3_TO_SERVER. When I downliad my internal table to the ftp server, the data file has a size of 0. There is no data in my data file.
Here my coding:
xml_string = here is my xml file which I move to l_t_bindata.
DATA:
l_f_handle TYPE i,
l_f_fname TYPE c LENGTH 50,
l_r_bindata TYPE xstring,
l_t_bindata LIKE STANDARD TABLE OF l_r_bindata.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = ' '
password = ' '
host = '172.172.0.54'
rfc_destination = 'SAPFTP'
IMPORTING
handle = l_f_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
CHECK sy-subrc = 0.
l_f_fname = 'DATA.xml'.
l_r_bindata = xml_string.
APPEND l_r_bindata TO l_t_bindata.
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = l_f_handle
fname = l_f_fname
character_mode = 'X'
TABLES
text = l_t_bindata
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = l_f_handle.
ENDIF.
Did someone know where the problem is that I get an empty data file ?
2009 Oct 28 1:16 PM
2009 Oct 28 1:19 PM
Hello,
thank you for your answer, I have already checked all RSFTP00... reports, furthermore I have searched in the forum for the problem, but when I look to other threads they use the same functions as I do, but why is my data file empty, I have one line in l_t_bindata, but when I transfer it to the ftp the data file is empty.
2009 Oct 28 2:39 PM
Hi, Check the below blog <li><b><u>[Transferring Data from SAP to Other Systems|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1426779150DB00445078734203682954End?blog=/pub/wlg/5564]</u></b> Thanks Venkat.O
2009 Oct 28 2:42 PM
Hi,
I have compare the coding of the mentioned blog and my coding and both are same. the problem is not in transfering data from sap to ftp, the problem which I have is that the transfered data file is empty although I have one line in my internal table.
2009 Oct 29 8:51 AM
2009 Nov 03 8:05 AM
2009 Nov 05 9:47 AM
Hi,
the download works now, but the problem is now that I have no xml. I get a hex data file:
TYPES: BEGIN OF t_file,
text(65535) TYPE c,
END OF t_file.
data:
l_r_bindata type t_file,
l_t_bindata LIKE STANDARD TABLE OF l_r_bindata,
xml_string TYPE xstring.
l_r_bindata-text = xml_string.
APPEND l_r_bindata TO l_t_bindata.
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = l_f_handle
fname = l_f_fname
character_mode = 'X'
TABLES
text = l_t_bindata
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
when I look to the data file on my ftp server there is no xml data, what I see is a hex data. How can I get the same xml which I move to l_r_bindata-text.