cancel
Showing results for 
Search instead for 
Did you mean: 

XML to CSV converter not working for root node with prefix and namespace SAP CPI

ramu_g4
Participant
0 Kudos

Hi Experts,

We are working on BTP SAP Integration Suite(Cloud Integration) and it receives XML like below.

But, XML to CSV convetor not working, can you guide me what needs to maintained on XML to CSV convertor.

Namespace prefix is "ns1" and should I maintain it somehwhere? please guide me.

XML input

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

<ns1:GPurchaseContract>

xmlns:ns1="http://corpintra.net/pi/P_LY/PurchaseContract">

<Plant>6282</Plant>

<MBPartNo>A2520100800</MBPartNo>

<MBPartName>CYLINDER HEAD COMPL</MBPartName>

<Project>MGE</Project>

</ns1:GPurchaseContract>

Thanks

Ramu

MortenWittrock
Active Contributor
0 Kudos

Hi Ramu

How is this not working? XML to CSV conversion works for me with your input and without declaring the namespace, actually.

Regards,

Morten

ramu_g4
Participant
0 Kudos

hi Marten,

I am getting below error on XML to JSON convertor step in iflow.

Thanks!

View Entire Topic
MortenWittrock
Active Contributor

Hi Ramu

Your XML is not valid; that is why the XML to CSV converter fails. I'm guessing your input should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<ns1:GPurchaseContract xmlns:ns1="http://corpintra.net/pi/P_LY/PurchaseContract">
    <Plant>6282</Plant>
    <MBPartNo>A2520100800</MBPartNo>
    <MBPartName>CYLINDER HEAD COMPL</MBPartName>
    <Project>MGE</Project>
</ns1:GPurchaseContract>

(Notice how I used the CODE button to insert this XML, without its formatting getting trashed.)

I can run this through the XML to CSV converter with no issues.

Regards,

Morten

ramu_g4
Participant
0 Kudos

hi Morten,

Now, XML to CSV convertor is working fine but now I am facing issue at another step XML to JSON convertor like below.

Thanks

Ramu

ramu_g4
Participant
0 Kudos

Hi Morten,

What is CODE button in CPI? Can you explain?

ramu_g4
Participant
0 Kudos

What is Code button

MortenWittrock
Active Contributor
0 Kudos

Hi ramu.g4

It's this button in the SAP Community, available when you write questions, answers and comments:

Regards,

Morten