cancel
Showing results for 
Search instead for 
Did you mean: 

Txt file to XML using File Adapter

Former Member
0 Kudos

Dear ALL,

I am doing file to file scenario, where i have to convert txt file from sender to xml as receiver .

I have done with all the conversion content parameters at the sender file adapter as below:

DocumentName:

DocumentNamespace:

RecordsetName:

RecordsetStructure:

Row.fieldNames :

Row.fieldSeparator:

Row.endSeperator:

Row.fromConfiguration;

Row.fieldFixedLengths:

Am i missing anything

still i am getting error as .

Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'Row.fieldFixedLengths' or 'Row.fieldSeparator' is missing Consistency check: no. of arguments in 'Row.fieldFixedLength' does not match 'Row.fieldNames' (0 <> 6)

Could anyone let me know where i am wrong in config.

Kind Regards,

Vijay

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

have a look at the following FCC blogs:

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1825] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7053] [original link is broken] [original link is broken] [original link is broken];

Reward points if useful

regards

Abhishek

Former Member
0 Kudos

i think the error occured in the field lengths

check the filed lengths in the text file ,and the same field lengths must be specified inthe FCC parameters

justin_santhanam
Active Contributor
0 Kudos

Vijay,

Could you give the sample CSV file looks like?

raj.

Former Member
0 Kudos

Hi Raj,

Its a text file..

80000023,1101,20080301,10,100435,10

80000024,1101,20080301,10,100436,10

Regards,

Vijay

justin_santhanam
Active Contributor
0 Kudos

Vijay,

Thanks!

Could you let us know , the configuration parameters you gave?

raj.

Former Member
0 Kudos

Raj,

I have provided all these details:

DocumentName:

DocumentNamespace:

RecordsetName:

RecordsetStructure:

Row.fieldNames :

Row.fieldSeparator:

Row.endSeperator:

Row.fromConfiguration;

Row.fieldFixedLengths:

Regards,

Vijay

justin_santhanam
Active Contributor
0 Kudos

Vijay,

I'm asking about the values for each parameter.

raj.

Former Member
0 Kudos

Hi Vijay,

Have u set the correct variables required for that i will do that it may help u

Row.fieldNames :GIVE THE FIELD NAMES HERE

Row.fieldSeparator: ,

Row.endSeperator: 'nl'

Row.fromConfiguration;THIS IS OPTINAL JUST LEAVE IT

Row.fieldFixedLengths:OPTIONAL

Regards,

Former Member
0 Kudos

Raj,

Please find the details

DocumentName: sto_dc.txt

DocumentNamespace: http://..

RecordsetName: MT_STO_FILEOUT

RecordsetStructure: Row,*

Row.fieldNames : Document_number,Site,Date,Item_number,

Article_number,Quantity

Row.fieldSeparator: ,

Row.endSeperator: 'nl'

Row.fromConfiguration; fromConfiguration

Row.fieldFixedLengths: 8,4,8,2,6,2

Regards,

Vijay

Former Member
0 Kudos

Hi Vijay,

Try with by giving either Field Seperator or Field Fixed Lenghts.Use one thing itself

Regards

Seshagiri

nisarkhan_n
Active Contributor
0 Kudos

DocumentName: sto_dc.txt----


>Message Type Name

DocumentNamespace: http://........---Name Space

RecordsetName: MT_STO_FILEOUT -


Root node of the DATA Type

RecordsetStructure: Row,*

Row.fieldNames : Document_number,Site,Date,Item_number,

Article_number,Quantity

Row.fieldSeparator: ,

Row.endSeperator: 'nl'

Row.fromConfiguration; fromConfiguration

Row.fieldFixedLengths: 8,4,8,2,6,2

you cannot give the Fielld Fixed lenght and field separator at once,,,,,remove the fixed field lengths your file is an , sepereator not fixed length one.

Former Member
0 Kudos

Hi,

Even if i am using fieldSeparator,

i am getting error as

Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Format error in 'xml.recordset' argument: incomplete structure (name,number) pair

Can any one guide me on this....

Regards,

Vijay

Former Member
0 Kudos

Vijay:

The FCC parameters have some typos or wrong input. Mainly check the "RecordSetStructure". it seems you have given some wrong in put. Could post the FCC parameters and the values.

Former Member
0 Kudos

Dear All,

I would like to thank one and all for their valuable time and suggestions in sharing time to fix this problem.

Now the problem is fixed..... i found a small bug..which costed

everyone's time.

a small spelling Mistake in FCC ...

i have mentioned as field.Seperator....

instead of field.Separator.

Kind Regards,

Vijay