cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion, with grouped Headers, Items, Customers etc

Former Member
0 Kudos

Hello all .

I have a requirement for an File to (many) Idoc scenario . The problem is, that I don't know how to use Content Conversion on the specific file structure that the external system produces .

Here is an example .

H field1 field2 field3 ....

H field1 field2 field3 ....

H field1 field2 field3 ....

I field1 field4 field5 ...

I field1 field4 field5 ...

I field1 field4 field5 ...

C field1 field6 field7 ...

C field1 field6 field7 ...

C field1 field6 field7 ...

So my problem is, that instead of having a structure like

H

I

I

C

.....

H

I

I

C

...

I have a structure where all the headers are grouped together, then all the items are grouped together, then the Customers etc .

In every line there is a field (field1) that contains the order number and so I should use it to group the appropriate Header, Items, Customer, etc.

Is this possible and if so, how ?

Thank you .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes u can do this.

It's not possible directly with simple direct FCC.

Try this..

Access all the records, header, I and C records as a single record... no difference between them.

In mapping all the records are under a single name so based on the logic for connection between the header and I and C,

u can create or split them into the structure u are expecting in the mapping...

U can go for 2 MM in a single interface mapping...

Let us know still u face any problem..

Babu

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you all for your help.

I'll give it a try and if I have any problems will come back to you .

Former Member
0 Kudos

It will be easy for you if you include intermediate mapping. If you know xslt mapping then it can be done easily otherwise do it via graphical mapping.

Just go through Michal's Blog for using intermediate mappings..

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

So your overall approach should be like this..

1. Create your first structure as Header, Item, Customer at same level with occurrance 0..unbounded

2. Create your second structure as Header 0..1, Item 0..unb, Customer 0..unb

3. Create your final target structure.

4. Do FCC as per your first structure.

5. Do your message mapping between first & second structure.

6. Do your mapping between output of step5 to final mapping

7. Arrange these mappings in your interface mapping (see Michal's blog)

Former Member
0 Kudos

Hi Markos,

You can do this using FCC, but you need to create one more intermediate message mapping.

In FCC, use fieldNames, fieldSeparator, endSeparator & keyFieldVale parameters for Header, Item & Custoemr each.

This will read all the values, keep the occurences of Header, Item & Customer in source structure as 0 to unbounded.

Then create the intermediate structure which will give you the output based on the order number as required.

In this mapping you have to use sort and sortByKey node functions.

-Supriya.