on ‎2021 Nov 10 1:28 AM
Dear Experts,
I am currently testing a CSV to XML conversion, where the source CSV consists of double quotes and the field names need to be fetched from the file. Currently, we're getting the below error which we would request any inputs from your end. I've browsed thru available blogs and it seems most of them are not using the "fromFile" option.
Thank you in advance!
Issue:
We're getting this error in communication channel - "Invalid 'processFieldNames' value 'fromFile' for mode 'structure conversion' found "
E.g., (source CSV)
"RecordType","ID","Description","Type","Preapproved Amount","Currency"
"RecordType","ID","Expense Preapproval ID","Type","Estimated Amount","Estimated Amount Currency"
"Header","15","End to end test for cash advance till Expense Report","","500.00","PHP"
"Line","15","15","","","","500.00","PHP"
Configuration:
Transform.Class: com.sap.aii.messaging.adapter.Conversion
Transform.ContentType: text/xml;charset=utf-8
xml.documentName: CoupaExpensePreapproval_CSV
xml.documentNamespace: http://namespace
xml.recordsetName: Recordset
xml.recordsetStructure: Header,*,Line,*
xml.keyFieldName: RecordType
xml.keyFieldType: CaseSensitiveString
xml.processFieldNames: fromFile
xml.conversionType: StructPlain2XML
xml.Header.keyFieldValue: Header
xml.Header.fieldSeparator: ,
xml.Header.endSeparator: 'nl'
xml.Header.processFieldNames: fromFile
xml.Header.enclosureSign: "
xml.Header.enclosureSignEsc: " "
xml.Line.keyFieldValue: Line
xml.Line.fieldSeparator: ,
xml.Line.endSeparator: 'nl'
xml.Line.processFieldNames: fromFile
xml.Line.enclosureSign: "
xml.Line.enclosureSignEsc: " "
Request clarification before answering.
Hi Orlan,
Please try the key field name with double-quote (""). Please refer the below link
https://answers.sap.com/questions/13492441/sftp-sender-messagetransformbean-quotation-mark-is.html
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, it was resolved by applying below changes.
xml.Header.keyFieldValue: "Header"
xml.Line.keyFieldValue: "Line"
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.