cancel
Showing results for 
Search instead for 
Did you mean: 

FILE Adapter (Key field)

Former Member
0 Kudos

Hi,

FILE-XI-FILE scenario

Msg Structure is like this

<b>DT_HEADER</b>

- >COMPANY

- >LOCATION

<b>DT_CONTENT</b>

->FIRSTNAME

->LASTNAME

->DESIGNATION

->LOGIN

->LOGOUT

->TIME

I have given <i>company and Firstname</i> as keyfield in the sender adapter paramemter.

In Content Convesion parameters :

DT_HEADER.keyFieldValue='HITACHI'.

DT_CONTENT.keyFieldValue='MM'

If that given value is in flat file.

it is giving output, but if the value is different,values are omitted

This key field may contain diferent values....

so how to tackle the situation

is there any option giving like '* '

regards

mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

KeyFields are used to group the record structure based on a single value.So it is not possible to have 2 values in the Keyfield.

cheers

jithesh

Former Member
0 Kudos

Hi Mahesh,

Without key field it will be impossible to distinguish between different substructures. If you have any logic to identify the rows ( Header or item ) you can apply the same in the custom-module and add a dummy key field to each row. These fields will have only two values - one for Header and one for Items. Based on this then you can configure the adapter.

The dummy key field can then be omitted in the resultant XML.

CHEERS

Amit

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Mahesh,

<i>Specify the value of the key field for the structure. This specification is mandatory if the key field name is set. Otherwise, the specification is ignored.</i>

If you use KeyField, then you will have to have it in your Source File. Just ignore this particular entry in your Sender File adapter.

regards,

Bhavesh

Former Member
0 Kudos

Hi,

AFAIK, I don't think this is possible:

is there any option giving like '* '

One option is to pick up the complete records and then map the data in the Module of the File adapter.

Regards

Vijaya

Shabarish_Nair
Active Contributor
0 Kudos

Hmmmmm .... dont u have any field in the file which can always contain a constant value ? Only then the concept of Keyfield will work.

Else u have to read the records in a record row fashion.

eg. /people/sravya.talanki2/blog/2005/11/29/night-mare-processing-huge-files-in-sap-xi