cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with File Content Conversion

Former Member
0 Kudos

Hi experts,

I know how to do the file content conversion when the input xml is like this:

<documentName>

<NameA>

<field-nameA1>field-value</field-nameA1>

<field-nameA2>field-value</field-nameA2>

<field-nameA3>field-value</field-nameA3>

</NameA>

</documentName>

The problem is I have an input xml like this:

<documentName>

<NameA>

<NameA_1>

<field-nameA1>field-value</field-nameA1>

<field-nameA2>field-value</field-nameA2>

<field-nameA3>field-value</field-nameA3>

</NameA_1>

<NameA_2>

<field-nameA1>field-value</field-nameA1>

<field-nameA2>field-value</field-nameA2>

<field-nameA3>field-value</field-nameA3>

</NameA_2>

</NameA>

</documentName>

How can I implement a nested structure like this?

Regards,

Javier,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

How many diffrent nodes do you have like NAMEA_1 NAMEA_2.... must be finite number

if you have say 4 or 5 .. like a finite/certain number of such records ,... then you can define that in FCC.. each as a seperate node..

define each as a seperate node...

But if suppose the number of such nodes is uncertain.... then what i wd advice you is... that ask the legacy system ppl that before sending this file to XI .... map it in a way... so that all the nodes are named...... NAMEA

BR,

Sushil.

Edited by: Sushil Hadge on Dec 11, 2008 8:36 PM

Edited by: Sushil Hadge on Dec 11, 2008 8:38 PM

Answers (6)

Answers (6)

former_member193376
Active Contributor
0 Kudos

Hi

This link may help

Thanks

Saiyog

Former Member
0 Kudos

Carlos,

Thanks for answering.

The fact is I need to have a "sub-substructure", just like the example of my first message.

I´ve found this link which shows a possible way to get it. It seems that it´s not possible to do it in the FCC directly.

http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphica...

Regards,

Javier

Former Member
0 Kudos

Hi Sushil,

Yes, the number is uncertain.

Thanks,

Javier

Former Member
0 Kudos

Carlos,

Yes, I´m using FCC in the sender adapter, and the source file is a flat file.

An example would be:

CCXCRGM10E200805050043

Z11234E3E4R5T

10ES0208330505575060YC

10ES0208330017592053AD

10ES0208330530147022AR

Z11234E3E4WDT

10ES0000030505575060YY

10ES0208330017520453AV

10ES020833053041232WW

FFXCRGM10E2008050500430000178

The two first letters of each line are used to identify the Name (key.field.Value).

First and last line are just the beginning and the end of the flat file.

The lines that start with Z1 can be n times in the source flat file. Each 'Z1' will have n '10' lines.

Thanks,

Javier

Former Member
0 Kudos

Hi,

Extracted from the link:

Under Recordset Structure, enter the sequence and the number of substructures as follows:
 <NameA,nA,NameB,nB,...>. 

Therefore, nA=1,2,3,... or * (for a variable, unlimited number, including 0).

Key Field Name

If you specified a variable number of substructures for Recordset Structure, in other words, at least one
substructure has the value u2018*u2019, then the substructures must be identified by the parser from their content.
A key field must be set with different constants for the substructures. In this case, you must specify a 
key field, and the field name must occur in all substructures.

Furtheremore:

Have a look at theese link:

Carlos

Former Member
0 Kudos

Hi Carlos,

I had already checked the link, but I don´t see where it explains my problem...

Thansk,

Javier

Former Member
0 Kudos

Hi,

Just to see if we are talking about the same issue.

You want to use FCC in your File Sender Adapter, don't you?

And what is the forma of your source file? a flat file or a xml file?

If it is a flat file, could your post an example of it?

I mean:

A,1234,skdjd

A.3455,kjdkd

B,4838,sjksj

...

Carlos

Former Member
0 Kudos

Hi Javier,

Have a look at this link:

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

I think it will be usefull for you.

Carlos