cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File Content Conversion

Former Member
0 Kudos

Hi All,

I have the following XML structure,which has the hierachy level of 4.

<?xml version="1.0" encoding="UTF-8"?>

<ROOT>

<CUSTOMERDETAILS>

<CUSTOMERNAME>VALUE</CUSTOMERNAME>

<PRODUCTS>

<ABCD>

<VALUE1>xxx</VALUE1>

<VALUE2>xxx</VALUE2>

<VALUE3>xxx</VALUE3>

<VALUE4>xxx</VALUE4>

<XYZ>

<VALUE1>xxx</VALUE1>

<VALUE2>xxx</VALUE2>

<VALUE3>xxx</VALUE3>

<VALUE4>xxx</VALUE4>

<DEF>

<VALUE1>xxx</VALUE1>

<VALUE2>xxx</VALUE2>

<VALUE3>xxx</VALUE3>

<VALUE4>xxx</VALUE4>

I need to convert the above XML file structure into Flat file.

Can anyone help me out in this.

Thanks in Advance,

Lavanya.B

Accepted Solutions (1)

Accepted Solutions (1)

varun_k
Contributor
0 Kudos

Hii,

A maximum of 3 hierachy level will be supported in FCC.

Have a glance at this thread

Regards,

Varun

Former Member
0 Kudos

Hi Varun,

Thanks for your quick response.Can you please tell me the alternative solution to solve,if the hierachy level is more than 3.

lavanya.B

Former Member
0 Kudos

Hi Lavanya,

The other solution would be to concat the elements in your child node and put it in a single field at a higher level.

Anyways you need a flat file at the end right , then you can read the concatenate contents under the field and there by reducing hierarchy.

You might have to add another mapping for concatenation in extreme cases if the mapping is too complex.

Thanks,

Zabiulla

Shabarish_Nair
Active Contributor
0 Kudos

please read the blog i have mentioned earlier.

Restructure your data type to have a flat structure instead of a hierarchical one.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi All,

Achieved by using the Conversion agent tool for the above stated scenario

Regards,

Lavanya

varun_k
Contributor
0 Kudos

Hi Lavanya,

Please refer to this Blog, See if this can help you

/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

Regards,

Varun

Edited by: Varun Reddy on Mar 5, 2009 2:04 PM

former_member192295
Active Contributor
0 Kudos

Hi,

XI/PI can support only 3 level, can't support more then three. Better to choose java/abap mapping to convert as flat file.

former_member206760
Active Contributor
0 Kudos

Dear lavanya,

you can write a custom java module on the receiver file adapter to achieve this..

Also you can use XSLT mapping for the same ...but i m not sure for XSLT mapping

Giving points is another way to say thanks

Shabarish_Nair
Active Contributor
0 Kudos

you cannot do FCC on hierarchies.

more: /people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

santhosh_kumarv
Active Contributor
0 Kudos