cancel
Showing results for 
Search instead for 
Did you mean: 

PI mapping complex structure file to Idoc

Former Member
0 Kudos

I have a problem with a mapping complex structure file to Idoc

My inbound file is structured like that :

<Z1CONF03>

data

</Z1CONF03>

<Z1CONF04>

data

</Z1CONF04>

<Z1CONF03>

data

</Z1CONF03>

<Z1CONF04>

data

</Z1CONF04>

And I want to put in a Idoc structured like that :

Idoc :

Segment Z1CONF03

     Segment Z1CONF04

Segment Z1CONF03

     Segment Z1CONF04

But my result is like that :

Segment Z1CONF03

     Segment Z1CONF04

     Segment Z1CONF04

Segment Z1CONF03

As you can see below :

How could I do ?

Thanks for your answers.

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Guz,

If segment Z1CONF03 and Z1CONF04 is always alternate then you can use split by value before mapping of Z1CONF04.

regards,

Harish

Former Member
0 Kudos

Thanks a lot, it's ok.

But in the case where we have n Z1CONF03 for 1 Z1CONF04 in the inbound file like that :

line 1 <Z1CONF03>

line 2 <Z1CONF03>

line 3 <Z1CONF04>

line 4 <Z1CONF03>

line 5 <Z1CONF03>

line 6 <Z1CONF03>

line 7 <Z1CONF04>

If I want to put in a Idoc structured like that :

Idoc :

Segment Z1CONF03 line 1

     Segment Z1CONF04 line 3

Segment Z1CONF03 line 2

     Segment Z1CONF04 line 3

Segment Z1CONF03 line 4

     Segment Z1CONF04 line 7

Segment Z1CONF03 line 5

     Segment Z1CONF04 line 7

Segment Z1CONF03 line 6

     Segment Z1CONF04 line 7

What can I do ?

Harish
Active Contributor
0 Kudos

Hi Guz,

As per your sample the pattern of occurence in Z1CONF03 and Z1CONF04 is not constant. So you need to identify the relationship between two segment. Which Z1CONF04 corresponds to which Z1CONF03.

regards,

Harish

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

How do you identify which "Z1CONF04" should belong to which Z1CONF03? (for the grouping)

What if there are multiple "Z1CONF04" in the source? how does your target looks like?

P.S

As already suggested, if you always get one "Z1CONF04" for each "Z1CONF03" then simply use "split by value" when you map "Z1CONF04"(for the provided input and output)