cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping conditional occurence, recurring tags

Former Member
0 Kudos

Hi all,

I have the following source structure

...

<E1AFFL>

<E1AFVOL>

<VORNR>0010</VORNR>

<E1RESBL>

<MATNR>4711</MATNR>

</E1RESBL>

</E1AFVOL>

</E1AFFL>

<E1AFFL>

<E1AFVOL>

<VORNR>0020</VORNR>

<E1RESBL>

<MATNR>8080</MATNR>

</E1RESBL>

<E1RESBL>

<MATNR>9090</MATNR>

</E1RESBL>

</E1AFVOL>

</E1AFFL>

...

and I want the following target structure

...

<access>

<VORNR>0010</VORNR>

<MATNR>4711</MATNR>

</access>

<access>

<VORNR>0020</VORNR>

<MATNR>8080</MATNR>

</access>

<access>

<VORNR>0020</VORNR>

<MATNR>9090</MATNR>

</access>

...

I tried it with useOneAsMany but it didn't work. The error message was: To many values

So I ask myself how I can map this with the standard node functions in graphical mapping tool.

Thanks

Florian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Florian,

Try this :

MATNR(Context - E1AFFL)---access

VORNR----


\

MATNR(Context - E1AFVOL)--\useOneAsMany-splitByValue[Each Value]---VORNR

MATNR(Context - E1AFVOL)----/

MATNR----MATNR

Thanks,

Maheshwari.

Former Member
0 Kudos

Hi Maheshwari,

your suggestion is very good.

But something strange is happening when I have three or at least more E1AFVOL tags.

For example if I add the following tags in the source structure then the result I get is not the same that I expect.

Additional added tags in the source structure

...

<E1AFVOL>

<VORNR><b>0180</b></VORNR>

<E1RESBL>

<MATNR>5010</MATNR>

</E1RESBL>

<E1RESBL>

<MATNR>1020</MATNR>

</E1RESBL>

</E1AFVOL>

...

The target structure

...

<access>

<VORNR><b>0020</b></VORNR>

<MATNR>5010</MATNR>

</access>

<access>

<VORNR>0180</VORNR>

<MATNR>1020</MATNR>

</access>

...

So I wonder myself why does the mapping function remember the old VORNR value?

Thanks in advance,

Florian

Former Member
0 Kudos

Hi Maheshwari,

that solved the problem.

Thanks,

Florian

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Flourine,

This is multiple messages merged in to one ,Am i Correct in the understanding of yr scenarion?

Regards

Former Member
0 Kudos

Hi ,

Map E1AFFL to access node so multipple instances of access will be created . Then while mapping MATNR and VORNR do the remove context .

Thanks

Suvarna