Skip to Content
avatar image
Former Member

SAP HCI - CSV file

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 09, 2017 at 05:20 AM

    Hi Tibin,

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

    regards,

    Praveen T

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 09, 2017 at 08:46 AM

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

    Regards

    GB

    Add comment
    10|10000 characters needed characters exceeded