cancel
Showing results for 
Search instead for 
Did you mean: 

Handling flat files in SAP HCI

ramu_g4
Participant
0 Kudos

Hi Experts,

We have 4 outbound interfaces (IDoc -> File) & 1 inbound interface(File -> IDoc) already live in

SAP PI 7.3 dual stack where FCC is the message protocol in both outbound & inbound interfaces. We are replicating these in SAP HCI & I already imported service interfaces, IDoc structures to HCI. As mentioned in outbound interface we need to convert IDoc to flat file & in inbound interface flat file need to be converted to IDoc. My question can we handle flat files in HCI, if so kindly guide me how to achieve this using HCI?

Thanks,

Ramu.

Accepted Solutions (0)

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Ramu,

Below will give you more details

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

Also it would be great if you can search in our community since we are already having similar threads with solutions for converter.

Regards,

Sriprasad Shivaram Bhat

ramu_g4
Participant
0 Kudos

Hi Shivaram,

Our requirement can be handled perfectly 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 remaining all can be acheived by above blog.

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 suggest me on the steps to achieve this?

Thanks,

Ramu.

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Ramu,

In SAP HCI FCC is not available.For converting flat file to XML structure you can leverage converter which supports conversion of delimited file to XML.

If you want to convert the file based on field length then you have to write groovy or JavaScript.

Regards,

Sriprasad Shivaram Bhat

ramu_g4
Participant
0 Kudos

Hi Shivaram,

We need to convert Flat file[CSV] to XML as well as XML to Flat file[CSV].Can you please elaborate on how to leverage converter for converting Flat file to XML & vice versa. Kindly share me the link or steps to be carried out to achieve this.

Thanks,

Ramu.