Application Development and Automation 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: 
Read only

XML file sent to ftp server but when we opened the file its coming in text format.

gagan_narendra
Product and Topic Expert
Product and Topic Expert
0 Likes
1,154

Hi,

I have a reqirement to fetch the data from multiple tables and send it to ftp server. I am concatinating the data with the xml tags and appending it into internal table and then i am using ftp function modules to send it to ftp server:

In this fm FTP_R3_TO_SERVER i am passing the internal table.

But when the file reaches the ftp sever its opening but not in xml format instead in word format.

Waiting for the reply...

1 ACCEPTED SOLUTION
Read only

weberpat
Contributor
770

FTP_R3_TO_SERVER pretty much transfers whatever you throw at it, so if what you're getting on your FTP server is not XML, you're not feeding it with XML. Can you see a valid XML message being passed to the function in debug mode?

5 REPLIES 5
Read only

kiran_k8
Active Contributor
0 Likes
770

Gagan,

Did you explored the options listed by the google search with the keyword "SAP + XML File Format + FTP" ?

K.Kiran.

Read only

NTeunckens
Active Contributor
0 Likes
770

Check if your input (the so-called XML) is 'valid' => Can you see your input in the ABAP Debugger as "XML"-Input and is it valid?

Further, there are some samples on FTP-Functions on SAP Wiki, and check some of the earlier questions on this topic, like this link ...

Read only

weberpat
Contributor
771

FTP_R3_TO_SERVER pretty much transfers whatever you throw at it, so if what you're getting on your FTP server is not XML, you're not feeding it with XML. Can you see a valid XML message being passed to the function in debug mode?

Read only

gagan_narendra
Product and Topic Expert
Product and Topic Expert
0 Likes
770

Hi,

Thank you for the answer. The '/' XML tag was missing while appending it to internal table. So while opening it in internet explorer it was taking as word format.

Read only

pokrakam
Active Contributor
0 Likes
770

"But when the file reaches the ftp sever its opening but not in xml format instead in word format."

No, the file doesn't open itself, a user opens it. Are you sure it is in word format? Have you opened it with a text editor? If you save an XML file with a name hello.doc, windows will try to open it with word. Since it's text, word can read and display it.

So please check whether you really have a problem.