Skip to Content
0

SAP HCI - CSV file

Aug 08, 2017 at 04:03 PM

228

avatar image
Former Member

Hello All,

I have a requirement to sent CSV files via mail.

The file have double header and followed by data.Example below.

token-id,custom-string1,custom-string2,custom-string3,date-of-birth,date-of-death,person-id-external

"Token ID","Former SAP User ID","Peoplesoft User ID","User ID","Date Of Birth","Date of Death","Employee ID"

Since the fields have special characters , I cannot create fields exactly as it is in XSD and build a mapping to populate data and convert to csv.

So I tried to convert the data without header in CSV and hardocreded the headers later in content modifier to along with the converted data as below.(${in.body} contains the data).

token-id,custom-string1,custom-string2,custom-string3,date-of-birth,date-of-death,person-id-external

"Token ID","Former SAP User ID","Peoplesoft User ID","User ID","Date Of Birth","Date of Death","Employee ID"

${in.body}


But I am getting the error as below in end to end process.The content modifier is expecting xml structure.How to handle this data conversion.Please help.


Message processing failed.

Inbound processing in endpoint at /DownloadFiles failed with message "Fault:Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 't' (code 116) in prolog; expected '<' at [row,col {unknown-source}]: [1,1].", caused by "WstxUnexpectedCharException:Unexpected character 't' (code 116) in prolog; expected '<' at [row,col {unknown-source}]: [1,1]"

Regards,

Tibin

10 |10000 characters needed characters left characters exceeded

Hello Tibin,

Did you check if the CSV to XML converter is of help to achieve your use case?

https://help.sap.com/viewer/e7761ff15b1d49e6ae03a2a8fe5f75bf/Cloud/en-US/fe338881f2fc4ea094c334b18e63a015.html

Regards,

Gayathri

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Praveen Tirumareddy
Aug 09, 2017 at 05:20 AM
0

Hi Tibin,

Could you please upload the screenshot of the flow as well.

regards,

Praveen T

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 09, 2017 at 08:46 AM
0

Why not you use message mapping and create duplicate subtree and give hardcode values in mapping only instead of content modifier

Regards

GB

Share
10 |10000 characters needed characters left characters exceeded