cancel
Showing results for 
Search instead for 
Did you mean: 

mapping question

Former Member
0 Kudos

Hi gurus,

we have following  input values

 

<root>

     <Person>

        <Name>jurgen</Name>

    </Person>

    <Person>

        <Name>julia</Name>

    </Person>

    <Person>

        <Name>jochen</Name>

    </Person>

    <Person>

        <Name>jens</Name>

    </Person>

</root>

and need the following output:

<root>

     <Person>

        <Name>jurgen</Name>

        <Name>julia</Name>

        <Name>jochen</Name>

        <Name>jens</Name>

    </Person>

</root>

Can any one guide me.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry,

the output should be:

<root>

     <Person>

        <Name1>jurgen</Name1>

        <Name2>julia</Name2>

        <Name3>jochen</Name3>

        <Name4>jens</Name4>

    </Person>

</root>

anupam_ghosh2
Active Contributor
0 Kudos

Hi Peter,

                try  this mapping

   name----->remove context-->copy value[0]------->Name1

  name----->remove context-->copy value[1]------->Name2

name----->remove context-->copy value[2]------->Name3

name----->remove context-->copy value[3]------->Name4

set context to root of source message.

Regards

Anupam

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Very simple...

name (source) --> removecontext --> name(target)

refer this wiki for example

http://wiki.sdn.sap.com/wiki/display/XI/Explain+node+functions

Note; Create target structure's person (1 to 1) and name (1 to unbounded) & while mapping name (source) context set to Person.

Message was edited by: Baskar Gopalakrishnan

MichalKrawczyk
Active Contributor
0 Kudos

Hi Peter,

just make the name as 1...unbound and map it without the context change

you can also check BIT460 (mapping workshop) if you need more help with mappings,

Regards,

Michal Krawczyk