on 10-19-2013 3:53 PM
Hi Experts,
I'm using the SAP File Adapter with File Content Conversion to convert | (pipe) delimited records into XML.
Below FCC parameters used in SENDER FILE adapter configuration.
Record.fieldSeparator = |
Record.endSeparator = 'nl'
Record.fieldNames = Indicator|StockItemCode|Warehouse|OtherWarehouse|TransactionDate|StockBatchNumber|BatchExpiryDate|Quantity|TransactionType|ReasonCode|Reference|SystemReference|Zone
Test Data in NFS IN UTF-8 format:
D|300002572|LG||11/10/2013|C300023|08092014|2|Y|GP10|0080040018|720860|K
Eoor in Communication channel:
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 3 according to structure 'row':java.lang.Exception: ERROR in configuration / structure 'row.': More elements in file csv structure than field names specified!
As per the above error we can understant that csv contains more values than fields specified in channel. But we cross checked many times on fileds specified and values in csv ...result same. Please share some idea on this error
Info: Where as we tried same fields and same values with COMMA (,) separated and it's working absolutely fine.
Regards,
MFH
Hi,
>>>>>>>>>>>>Record.fieldNames = Indicator|StockItemCode|Warehouse|OtherWarehouse|TransactionDate|StockBatchNumber|BatchExpiryDate
I think field names here should be seperated by comma.
You will specify the delimiter like -------- Record.fieldSeparator = |
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Correct syntax to use Record.fieldNames is field names separated by , (commas).
eg. use below parameter:
Record.fieldNames = Indicator,StockItemCode,Warehouse,OtherWarehouse,TransactionDate,StockBatchNumber,BatchExpiryDate,Quantity,TransactionType,ReasonCode,Reference,SystemReference,Zone
Hope it will work for you.
Cheers.
Sudeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> More elements in file csv structure than field names specified!
Few cents.. See whether you specified field names all of them that is coming in the file . Also you did not have any typo mentioning field names with respect to field that you specified in the xml structure. Please check that area first...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you are sending file as .csv with pipe delimited, the complete record is considered as 1 field. Correct me if i am wrong. Hence, above error.
Sending the file as .txt with pipe delimited will work absolutely fine.
Regards,
Pranay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for all inputs. I have tried in different ways with .csv and .txt extensions.
My requirement is have to picked up PIPE (|) delimited file using file adapter.
FYI - The same STRUCUTRE & TEST DATA working fine with COMMA (,) values. But the same STRUCUTRE & TEST DATA'S giving below error with PIPE delimited values.
Error:
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'row':java.lang.Exception: ERROR in configuration / structure 'row.': More elements in file csv structure than field names specified!
Regards,
MFH
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.