Skip to Content
0
Former Member
Apr 23, 2007 at 01:57 PM

Problem with Message-Mapping: Loop over Elements possible?

288 Views

Hi all,

I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.

Here a simple example (source structure) for better understanding:

<root>

<invoice>

<number> 10 </number>

<sum> 200.00 </sum>

</invoice>

<invoice>

<number> 20 </number>

<sum> 150.00 </sum>

</invoice>

<invoice>

<number> 30 </number>

<sum> 120.00 </sum>

</invoice>

</root>

Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.

I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.

Can anybody help me? Thanks

With kind regards

Christopher