cancel
Showing results for 
Search instead for 
Did you mean: 

Send a flat file with fixed lengths to XI 3.0 using a Central File Adapter?

Former Member
0 Kudos

Hello,

I'm wondering if someone have experience setting up conversion for different record structures. The example shown,

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter,

(in a greate way) only picture one kind of structure.

How should it be done if the file would contain

10Mat1

20100PCS

The first record structure has columns

ID(2),Material(10)

The second redcord structure has columns

ID(2),Quantity(3), Unit of messure (3)

Brgds

Kalle

Message was edited by: Karl Bergstrom

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

The configuration would be like follows:

Content Conversion Parameters:

Document Name: <your message type name>

Document Namespace: <your message type namespace>

Document Offset: <leave empty>

Recordset Name: <any name>

Recordset Namespace: <leave empty>

Recordset Structure: row1,,row2,

Recordset Sequence: any

Recordsets per Message: *

Key Field Name: ID

Key Field Type: String

Parameters for Recordset Structures:

row1.fieldNames ID,Material

row1.fieldFixedLengths 2,10

row1.keyFieldValue 10

row2.fieldNames ID,Quantity,UOM

row2.fieldFixedLengths 2,3,3

row2.keyFieldValue 20

Instead of row1 and row2 you can choose any name.

Regards

Stefan

Former Member
0 Kudos

Hello,

thanks but i still do not get it to run:

I do not have any configuration parameter called:

Recordset Sequence: any

I have followed your suggestions but I get the following error message:

Last message processing started 09:58:01 2005-01-10, Error: Conversion of complete file content to XML format failed around position 0 with sun.io.MalformedInputException

Brgds

Kalle

stefan_grube
Active Contributor
0 Kudos

The parameter 'Recordset Sequence' comes with SP10, you can ignore it so far.

Make sure, that there is no trailing blank in your configuration. Check the Adapter Monitor for error messages:

http://<yourHost>:<yourJ2EEPort>/AdapterFramework

Regards

Stefan

Former Member
0 Kudos

Hello,

it's there I found the errormessage I described:

Sender Adapter v1028 for Party '', Service 'SCA_LEGACY_FILESYSTEM':

Configured at 10:46:28 2005-01-10

Last message processing started 10:46:28 2005-01-10, Error: Conversion of complete file content to XML format failed around position 0 with sun.io.MalformedInputException

last retry interval started 10:46:28 2005-01-10

length 11000,000 secs

Brgds

Kalle

stefan_grube
Active Contributor
0 Kudos

When I compare the input file with the configuration: are you sure, that the material number has 10 signs? Mat1 followed by 6 spaces?

Otherwise change the config to:

row1.fieldNames ID,Material

row1.fieldFixedLengths 2,4

row1.keyFieldValue 10

row1.lastFieldsOptional YES

Regards

Stefan