cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot process a Fixed Field Length file using the File Adapter (Sender)

Former Member
0 Kudos

Hi -

I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue. When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found. Why would I require a key field when I am using fixed field lenghts? The file is comprised of 2 structures - 1 header and multiple details (see below). There are no key fields in the flat file that I would be able to use. Any suggestions?

011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000

12345678 100500 100500 Supplier 1 0000000000030000002008040400

12345678 100501 100501 Supplier 2 0000000000052000002008042100

The File Adapter is configured as follows:

Document Name = Rfchke00

Document Namespace = 'my namespace'

Recordset Name = Rfchke00

Recordset Structure = Dtachkh,1,Dtachkp,*

Recordset Sequence = Ascending

Recordsets per Message = 1

Key Field Type = String (Case-Sensitive)

Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31

Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11

Dtachkh.processFieldNames = fromConfiguration

Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21

Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9

Dtachkp,processFieldNames = fromConfiguration

Thanks,

Dave

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

you can use the module from which u can convert your structure to

H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000

D12345678 100500 100500 Supplier 1 0000000000030000002008040400

D12345678 100501 100501 Supplier 2 0000000000052000002008042100

Please note the extra H,D in the struture added by the module.

You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC

While writing the content conversion after that please dont forget about the added new characters

Please note also that i can find that the word supplier kept repeating in all the Dtachkp records

Please use that

Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.

try this out

Rgds

Aditya

former_member192295
Active Contributor
0 Kudos

HI,

According to your requirement we need to add below statements.

addheaderline = 0

ignoreRecordsetname = true

find below link for more help

Now it will work

Former Member
0 Kudos

Nallum -

I added the following attributes but I still get the error.

Dtachkh.addHeaderLine = 0

ignoreRecordSetName = true

Thanks,

Dave

Former Member
0 Kudos

Hi,

When you have specified the keyfield name as one particular field, make sure that value is getting populated in the file.

If that value is not present in the file which is been expected by XI, then it will throw the error mentioned by you.

Let me know what you have specified as keyfieldname and also check the corresponding value.

You should be having an identifier called HDR as keyfield value for header and ITM for item level

Former Member
0 Kudos

Try also removing that keyfieldvalue parameter and check whether it is working or not.

If you have set the keyfieldname, then keyfieldvalue is mandatory.

So try removing the keyfieldvalue and run it.

Edited by: Krish on Sep 10, 2008 8:55 PM

Former Member
0 Kudos

Krish -

The issue we have with this file is that there are no key field names we can use. Since this file is fixed length and I identify the Recordset Structure as Dtachkh,1,Dtachkp,* (1 header and multiple details) and there is only 1 Recordsrets per Message, why are key field names required?

Thanks,

Dave

Former Member
0 Kudos

Hi,

I can understand your concern. Just wanted to double check whether you have mentioned anything in the keyfieldname parameter on the content conversion tab.

After the recordsets per message, you have that option, if u had given anything than the CC will expect value.

Just check in ur CC and let me know.

Former Member
0 Kudos

Hi,

I do believe that parameter is required. Though you are using fixed length, you can always specify the first field name as key field name in ur header and item level.

I did check and it is working fine for me

Former Member
0 Kudos

Krish -

Thanks for the reply. Are you suggesting the following additions (in bold)? I still get the error with this configuration.

Document Name = Rfchke00

Document Namespace = 'my namespace'

Recordset Name = Rfchke00

Recordset Structure = Dtachkh,1,Dtachkp,*

Recordset Sequence = Ascending

Recordsets per Message = 1

Key Field Type = String (Case-Sensitive)

Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31

Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11

Dtachkh.processFieldNames = fromConfiguration

Dtachkh.keyFieldName = F1

Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21

Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9

Dtachkp,processFieldNames = fromConfiguration

Dtachkp.keyFieldName = F1

Dtachkh.addHeaderLine = 0

ignoreRecordsetName = true

Thanks,

Dave

Former Member
0 Kudos

Calling all SAP experts, I'm sure someone has implemented a file conversion with fixed field lenghts that do not contain any record keys.

Anyone?

Thanks,

Dave

Former Member
0 Kudos

Hi Dave,

The best solution for this is to use Custom Adapter Module which will read the file content data and will add a key to Header and LineItem and then you can use your FCC. This is tried and tested solution.

thanks

amit

Former Member
0 Kudos

You need to give key field value also.

NameA.keyFieldValue

Specify the value of the key field for the structure. This entry is mandatory if the key field name is set. Otherwise, the entry is ignored.

http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Thanks,

Beena.

santhosh_kumarv
Active Contributor
0 Kudos

>>Why would I require a key field when I am using fixed field lenghts? The file is comprised of 2 structures - 1 header and multiple details.

This is why the channel is expecting an keyfield value. How can the FCC understand which is header and which is the details.

Thanks

SaNv...