cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HCI - CSV file

Former Member
0 Kudos

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

0 Kudos

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/fe338881f2fc4ea094c334b18e6...

Regards,

Gayathri

Accepted Solutions (0)

Answers (2)

Answers (2)

gagandeep_batra
Active Contributor
0 Kudos

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

Regards

GB

0 Kudos

Hi Tibin,

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

regards,

Praveen T