cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SFTP StructPlain2XML Conversion - double quotes and processFieldNames (fromFile)

orlanmartinezdu
Explorer
0 Likes
1,353

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: " "

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Likes

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

orlanmartinezdu
Explorer

Thanks, it was resolved by applying below changes.


xml.Header.keyFieldValue: "Header"

xml.Line.keyFieldValue: "Line"

Answers (0)