cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to transform Flat file to Data Type Structurated and map to IDOC

Former Member
0 Kudos

Hi all,

I have a file to idoc scenario.

The information is like this:

1#!445#!AI12#!1#!20070214#!DVXXXXR#!201#!31GINHG876#!#!

2#!#!ETC

3#!000000000030008888#!#!3000#!#!10#!#!20070215

4#!dades45#!b#!c#!d#!e#!f#!g

5#!pos5

where 1, 2, ... = key segments for the file adapter and #! are the field separator.

this must go to a Data Type with substructures like this:

(xml)

.1

......2

.3

......4

......5

where 2 is inside 1 and 4-5 inside 3.

The reason of this is we can get unbounded replays of 3/4/5 for one header.

But XI reads the information like if all segments are headers.

.1

.2

.3

.4

.5

So the IDOC is bad created.

Where is the issue? At Message Mapping all substructures are mapped with his default and at TEST option it works fine.

Thanks in advance for your help.

best regards

Message was edited by:

Federico Martin

Message was edited by:

Federico Martin

View Entire Topic
Former Member
0 Kudos

Hi Federico,

Can u just post the conversion parameters u hv set in th comm. channel to do this.

Also, check the following link

<a href="/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30:///people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

Regards,

Akshay

Former Member
0 Kudos

Thanks for answer:

The recordset structure at CC Chanel its:

E1BPRKPFC,1,Z1MRES,1,E1BPRESBC,,Z1SOLRES,,Z1MRES02,*

Details:

E1BPRKPFC.fieldSeparator = #!

E1BPRKPFC.keyFieldValue = 1

E1BPRKPFC.fieldNames = SEGMENT,RES_NO,PLANT,COUNTER,RES_DATE,CREATED_BY,MOVE_TYPE,COST_CTR,MOVE_PLANT,MOVE_STLOC

E1BPRKPFC.endSeparator = 'nl'

E1BPRKPFC.ignoreRecordsetName = true

and like this for every segment of the recordset structure.

I had seen your link, but the problem it's that there are only header structures, i mean

1.

2.

3.

and i need:

1.

....2.

3

....4

where 2 it's inside 1 and 4 inside 3.

Thank you in advance,

fede

Former Member
0 Kudos

Hi Federico,

You can handle this using a workaround. Wht u can do is create a data type hich will hv E1BPRKPFC, Z1MRES, E1BPRESBC, Z1SOLRES, Z1MRES02 as headers. So, read the text file and using content conversion, create this sructure.

Now, create another data type which will hv the desired structure as req by u. Using XSLT mapping, u can transform the first structure to the desired one. Then u hv to transform this structure to the target structure in another mapping. You will hv only one interface mapping n which u will provide the two mappings sequentially in order. The second mappin can be a graphical mapping.

Regards,

Akshay

Former Member
0 Kudos

Hi,

thanks for answer.

Is impossible another solution? We can't believe that can't create DT with subestructures with "standard" options.

If not, how i must create the XSLT mapping? Is any guide for do it?

thanks in advance, best regards

Former Member
0 Kudos

Hi,

You can complete the second mapping graphically. I think there is no need to go for XSLT mapping and all.

What you need to do is to map a flat XML structure to nested XML structure. Take care of parent node mappings and its occurence.

Regards,

P.Venkat

Former Member
0 Kudos

thanks all for your interest.

Shabarish has explained it's impossible to do it, but i understand that P.Venkat says it can be with graphical mapping.

I attached the images of my message mapping and interface mapping, wich uses the first one, so you can see it.

Actually the Data Type has Hierachy level, but really it now work because File Adapter CC it's unable to create it. I need it because, if not, it's impossible to read a large text flat file with unbounded replays for the extended segments.

Please refer to:

<a href="http://img291.imageshack.us/img291/7073/designermappingrc8.jpg">Message Mapping Screenshot</a>

<a href="http://img249.imageshack.us/img249/694/interfacemappingtt6.jpg">Interface Mapping Screenshot</a>

Regards,