09-04-2013 9:05 AM
Dear all,
here i am passing an issue wile passing the data from the sap system to the Ftp server. as in the below code when i user the data(2550) the file is getting copied correctly but if i use the data x string type i am facing the issue.
TYPES: BEGIN OF ty_xml_line,
data(2550) TYPE x, or data type xstring
END OF ty_xml_line.
DATA: gt_xml_table TYPE TABLE OF ty_xml_line,
gs_xml_table LIKE LINE OF gt_xml_table.
gs_xml_table-data = request_data. " request_data is coming as a Xstring input from other file.
APPEND gs_xml_table TO gt_xml_table.
CALL FUNCTION 'HTTP_SCRAMBLE'
CALL FUNCTION FTP_CONNECT
CALL FUNCTION FTP_COMMAND
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = w_hdl
fname = wrk_file "file path of destination system
character_mode = 'X'
TABLES
text = gt_xml_table[]
Thanks & Regards
Suresh babu
09-04-2013 10:52 AM
Hi,
I suppose the data of your XML is not text but hexa.
Please refer program RSFTP007 ... Run it and check if the file is created if yes.. then there is a problem in the way you are passing the data.
Regards
09-04-2013 10:52 AM
Hi,
I suppose the data of your XML is not text but hexa.
Please refer program RSFTP007 ... Run it and check if the file is created if yes.. then there is a problem in the way you are passing the data.
Regards
09-04-2013 1:06 PM
Dear mohammed ,
like u said i have debugged RSFTP007 and found the it through a dump saying that "Exception condition "TCPIP_ERROR" raised." due to in the FM FTP_R3_TO_SERVER it raising the '-1' error.
Can u please tell me what might be the issue here?
Thanks in advance
09-04-2013 1:16 PM
Hi,
For using FTP in SAP you have to set up an RFC destination have you done that...
If not execute RSFTP005, to generate the destination.
Then Run it.
Regards
09-04-2013 2:53 PM
09-05-2013 6:23 AM
In that case can you mark the question answer correct or assumed answered to the question whatever appropriate to close the thread...
Thanks