Skip to Content
0
Former Member
Jan 23, 2006 at 10:33 PM

Error in Flat File to XML conversion

328 Views

Hi all,

I am trying to convert a flat file to XML using the Sender File Adapter and I am getting the following error message.

--

2006-01-23 17:23:00 EST: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 2 according to structure 'GL_FileUpload_SAPECC_Header_DT1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

---

My flat file looks like this,

--Start

GL,GLI,1,RefTest,4011,Test,1234567890,12032005,12032005,GL,RK

GL,GLI,4011,3011,,,,,,AU,600,7000,8000,9000,5000,RK,,,,,,,,,,,,,,,,,,,,

---End

The adapter configuration is like this:

Document Name: GL_FileUpload_SAPECC_Item_MT1

Document Namespace: urn:corptech.qld.gov.au:sss_std_offering:gl

RecordSet Name: GL_FileUpload_SAPECC_Record_DT1

RecordSet Namespace: urn:corptech.qld.gov.au:sss_std_offering:gl

RecordSet Structure: GL_FileUpload_SAPECC_Header_DT1,1,GL_FileUpload_SAPECC_Item_DT1,*

RecordSet Sequence: Ascending

Key FieldName: TransType

On the Adapter Properties, I have got:

--Start

GL_FileUpload_SAPECC_Header_DT1.fieldNames: TransType,RowType,SequenceNo,ReferenceKey,SenderSystem,HeaderText,CompanyCode,DocumentDate,PostingDate,DocumentType,ReferenceNo

GL_FileUpload_SAPECC_Header_DT1.fieldSeparator: ,

GL_FileUpload_SAPECC_Item_DT1.fieldNames: TransType,RowType,SequenceNo,GLAccount,CostCentre,ProfitCentre,InternalOrder,WBSElement,TaxCode,Currency,GLAmount,VendorAmount,CustomerAmount,AssetAmount,DRCR,ItemText,VendorNo,CustomerNo,Name,Street,City,PostCode,PoBox,State,Country,BankKey,BankAccount,BankCountry,CalcTax,PaymentTerms,BaseDate,PaymentBlock,PaymentMethod,Assignment,AssetNo,AssetSubNo,AssetTransaction

GL_FileUpload_SAPECC_Item_DT1.fieldSeparator: ,

ignoreRecordsetName: true

GL_FileUpload_SAPECC_Header_DT1.keyFieldValue: GL

GL_FileUpload_SAPECC_Item_DT1.keyFieldValue: GL

---End

The structure defined on the data type looks like this,

--Start

GL_FileUpload_SAPECC_Record_DT1 Complex Type

GL_FileUpload_SAPECC_Header_DT1 Element

TransType Element

RowType Element

Sequence Number Element

---

---

GL_FileUpload_SAPECC_Item_DT1 Element

TransType Element

RowType Element

Sequence Number Element

GLAccount Element

---

---

---End

Any help or suggestion please.

Thank you.

Warm Regards,

Ranjan