Skip to Content
-1

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

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...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 04, 2017 at 02:58 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Sep 04, 2017 at 02:42 PM

    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 ...

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 05, 2017 at 09:13 AM

    "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.

    Add comment
    10|10000 characters needed characters exceeded