Skip to Content
0

Modifying the field names of header & content

Jun 15, 2017 at 10:58 AM

100

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Avinash Bandela Jun 16, 2017 at 03:41 AM
0

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


capture.jpg (9.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 29, 2017 at 01:29 PM
0

Hi Ramu,

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

Regards,

Tibin

Share
10 |10000 characters needed characters left characters exceeded