cancel
Showing results for 
Search instead for 
Did you mean: 

Issues in FCC

Former Member
0 Kudos

Hi,

I am working on a scenario File to IDOC.

I have a CSV source file, so I have usd File content conversion in my sender communication channel.

I am unable to convert my file successfully to xml.

My Source Structure is like :

OrderHeader

A

B

C

Item

A

M

N

OrderHeader

A

B

C

Item

A

M

N

Now we do not have any key field specified in the structure. If I try to give the Key Feild Name as 'A', then I cannot hardcode it as I do not know the fixed value. And if I add Key Field Name externally, this extra field won't be present in my source file, so it is unable to parse the source file, and returns the empty document.

Any help on this. If we do not have any field that can be recognized as key field in source structure, how to handle this.

Thanks,

Vikas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vikas,

You ask the team who ever is sending the source file to add a key field say H for Header and D for detail or anything for key field. If they ask why you can say with the help of this we can tie the header and the corresponding details. Without that it is not possible to say which header belongs to which details.

Without key field in the source file in your case the content conversion is not possible.

Regards,

---Satish

Answers (8)

Answers (8)

Former Member
0 Kudos

Thanks all for your replies.

Asked sender to send the Key fields. It's working now.

Vikas

Former Member
0 Kudos

Its is not a flat file but CSV.

@jyothi :

You did not specify the key field anywhere i the example shown.

You just gave the fieldNames as A,B,C. Where should we then add the keyfield and the keyfield value.

Can you explain in a bit detail if possible.

And also you specified AdditionalLastFields for Header and MissingLastField for Item. Any particular reason for this.

I think in both we can add missinglastfield, which eventually doesn't work though.

Also can we add any module for this.

The main problem is that when I add a key field externally, this is not present in my source file due to which it does not parse the source file successfully. Source file has then actually less number of fields than configures in file content conversion.

How can we handle this.?

Thanks,

Vikas

Former Member
0 Kudos

Keyfield is mandatory whenever Recordset Structure is Orderheader,,Item, .

key field must be static and must exist

if you have dynamic key field,then it can't be done via FCC,you need to read each record individually and split them via java mapping or UDF.

Read your flat file in simple structure like

Record...1 to unbounded

-


> Row.....1

read flat file row by row in field Row, then apply mapping such that it identifies OrderHeader and Item fields

Thanks

Edited by: Kubra fatima on Aug 21, 2009 7:22 AM

Former Member
0 Kudos

So how do I do taht.

SHould I add them externally.

Because in my present source file no field can be taken as a Key Field and hence can't specify key field value for that.

If I add externally that field won't be present in source file to successfully parse. Again empty document.

How should I handle this

Former Member
0 Kudos

Do I nedd to specify Key Field Name, and some Key filed value for that?

jyothi_anagani
Active Contributor
0 Kudos

Yes.

Former Member
0 Kudos

keyfield is required to identify each recordset/node in your structure

I dont think you can convert your file into xml without key field in your case.

Former Member
0 Kudos

Its nota data type just a CSV File.

Example:

101,"ABC",XYZ,12

102,"ABD",UVW,11

101,"Z1"

101,"Z2"

102,"Z3"

102,"Z4"

Some thing like this.

First two line are for OrderHeader, and the rest ones for Item.

Now none of the field in Header and Item can be specified as the Key field as we need to specify a key value for that, but that cannot be hardcoded.

Thanks,

Vikas

jyothi_anagani
Active Contributor
0 Kudos

Hi Vikas,

RecordsetStructure OrderHeader,*,Item,*

OrderHeader.fieldSeparator        ','
OrderHeader.endSeparator        nl
OrderHeader.fieldNames            A,B,C
OrderHeader.additionalLastFields     ignore

Item.fieldSeparator    ','
Item.endSeparator     nl
Item.fieldNames         M,N,O
Item.missingLastfields      ignore

and without keyfield it is not possible to combine the similar OrdersHeader and Item

Thanks

jyothi_anagani
Active Contributor
0 Kudos

> Vikas Mishra wrote

> Hi,

>

> My Source Structure is like :

>

> OrderHeader

> A

> B

> C

> Item

> A

> M

> N

> OrderHeader

> A

> B

> C

> Item

> A

> M

> N

>

Hi Vikas,

Is this your source Data Type(Structure) or your CSV File...If it is Source Structure , Just provide me the CSV file also...then 'll help you ...

Thanks