cancel
Showing results for 
Search instead for 
Did you mean: 

Save XML file into FTP PI

0 Kudos

Hi Experts,

I'm facing a little problem.

I need to save a xml file into a ftp.

The communication is already done and works perfectly.

My Payload, is send from ECC SAP via RFC, and is like that:

But the .xml saved in ftp when opened is like this:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:MT_InvoiceToDescartes xmlns:ns1="http://www.brf.net/ediEurope/AperakToDescartes"><XML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;

&lt;INVOICES&gt;

  &lt;Envelop&gt;

    &lt;senderId&gt;123456&lt;/senderId&gt;

    &lt;recipientId&gt;123457&lt;/recipientId&gt;

    &lt;controlNumber&gt;&lt;/controlNumber&gt;

    &lt;dateTime&gt;20150903091225&lt;/dateTime&gt;

    &lt;testIndicator&gt;1&lt;/testIndicator&gt;

    &lt;messageType version=&quot;1&quot;&gt;INVOICE&lt;/messageType&gt;

  &lt;/Envelop&gt;

&lt;/INVOICES&gt;</XML></ns1:MT_InvoiceToDescartes>

But what I realy need, is the file was only the data that is into <XML> and not converted, like this:

<?xml version="1.0" encoding="iso-8859-1"?>

<INVOICES>

  <Envelop>

    <senderId>123456</senderId>

    <recipientId>123457</recipientId>

    <controlNumber></controlNumber>

    <dateTime>20150903091225</dateTime>

    <testIndicator>1</testIndicator>

    <messageType version="1">INVOICE</messageType>

  </Envelop>

</INVOICES>

I Need to do something in the Message Mapping or configure something more in the Channel Communication File?

I read some discusions, but I don't know what is applied to my case.

Thanks in advance.

Accepted Solutions (0)

Answers (4)

Answers (4)

RaghuVamseedhar
Active Contributor
0 Kudos

Antonio,

If input xml = output xml. Remove Operational Mapping from Interface determination or ICO. i.e. no message mapping is required/executed. Test the interface end to end.

If you want some transformation (input xml != output xml), then use CopyXML feature in message mapping.

Former Member
0 Kudos

Hi,

Try Changing the Transfer Mode(Target Tab) & File Type(Processing Tab) as "Binary" and Check

former_member186851
Active Contributor
0 Kudos

Try Changing the encoding

<?xml version="1.0" encoding="UTF-8"?>-I guess this is in the XML written in the FTP.

<?xml version="1.0" encoding="iso-8859-1"?>- what you need?

0 Kudos

Just to clarify.

My interface is an RFC to File

There is a field exporting calling I_XML, that is a string.

In this field I send an XML, in case this XML:

<?xml version="1.0" encoding="iso-8859-1"?>

<INVOICES>

  <Envelop>

    <senderId>123456</senderId>

    <recipientId>123457</recipientId>

    <controlNumber></controlNumber>

    <dateTime>20150903091225</dateTime>

    <testIndicator>1</testIndicator>

    <messageType version="1">INVOICE</messageType>

  </Envelop>

</INVOICES>

I Need only this go to the file, nothing more or nothing different, exact this.

But during the mapping and process of the interface, somethng occurs that modify completly my string.

So, the file in ftp is this:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:MT_InvoiceToDescartes xmlns:ns1="http://www.brf.net/ediEurope/AperakToDescartes"><XML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;

&lt;INVOICES&gt;

  &lt;Envelop&gt;

    &lt;senderId&gt;123456&lt;/senderId&gt;

    &lt;recipientId&gt;123457&lt;/recipientId&gt;

    &lt;controlNumber&gt;&lt;/controlNumber&gt;

    &lt;dateTime&gt;20150903091225&lt;/dateTime&gt;

    &lt;testIndicator&gt;1&lt;/testIndicator&gt;

    &lt;messageType version=&quot;1&quot;&gt;INVOICE&lt;/messageType&gt;

  &lt;/Envelop&gt;

&lt;/INVOICES&gt;</XML></ns1:MT_InvoiceToDescartes>

Note that the values of the fields are the same, but it included the encoding, and substitute the '<' '>' by '&lt;' and '&gt;', and other things.

I don't know, what i need to do to make PI don't modify the string, and save only the string I send.

To be more exactly, this is my Message Mapping

My CC File is this:

Thanks for response Amarnath Mand Raghuraman Sritharan.

And sorry for my english, I'm still learning.

Former Member
0 Kudos

Hello Neto

Just open you message type, there you find XML Namespace option and just remove the namespace. save and activate.

Now you try your scenario and check.

Regards

Amarnath..