Skip to Content

Modifying the field names of header & content

Hi Experts,

We are working on IDoc to File[CSV] in SAP HCI & our requirement can be handled 80% by below blog but except one additional change.

https://blogs.sap.com/2016/01/14/hci-xml-to-csv-conversion-in-hci/

The modification what we need is both header names & values should be present inside " " just like below.

Input Payload <?xml version=’1.0′ encoding=’UTF-8′?>

<Records>

<Line>

<Field1>ABC</Field1>

<Field2>123</Field2>

<Field3>XXX</Field3>

<Field4>567890</Field4>

</Line>

<Line>

<Field1>XYZ</Field1>

<Field2>456</Field2>

<Field3>YYYY</Field3>

<Field4>98765</Field4>

</Line>

</Records>

Output Payload “Field1”,”Field2”,”Field3”,”Field4”

“ABC”,”123”,”XXX”,”567890”

“XYZ”,”456”,”YYYY”,”98765”

Kindly guide me to achieve this.

Thanks,

Ramu.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 16, 2017 at 03:41 AM

    Hi Ramu,

    There are few symbols which XML dont allow in its payload. " is one of them.

    In your message mapping, try using capture.jpg wherever you need " . Its the escape character.

    Thanks & Regards,

    Avinash Bandela

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 29, 2017 at 01:29 PM

    Hi Ramu,

    I have the same requirement.How do you achieved this.

    Regards,

    Tibin

    Add comment
    10|10000 characters needed characters exceeded