cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping : map target element based on header

former_member190239
Participant
0 Kudos

Hi experts,

I have a requirement where the source and target structure are same as below

<root> <Header> <Detail1> <Detail1Field1> </Detail1> <Detail2> </Detail1Field2> </Detail2> <Detail3> </Detail1Field3> </Detail3> </root>

But in the source message the Header will have a value "Detail1" then only Detail1 node shoudl be created and so on for node 2 and node 3..

can you pls suggest the way fwd

Accepted Solutions (0)

Answers (3)

Answers (3)

binod8
Active Participant
0 Kudos

Hi Ravi,

As per my understanding, the suggested node functional should help you. You may check any field or value to create target node. If this still do not help you then please share source and target example to understand your requirement more clearly.

Thanks,

Binod

former_member190239
Participant
0 Kudos

Thanks Binod.. but what I am looking for is if value of Header is say "Detail1" then target node "Detail1" should occur as many times as source node "Detail1".. so i cannot check for any value in source node.. but an element above it

binod8
Active Participant
0 Kudos

Hi Ravi,

Try node function "createif". It is used when you want to create target node or element based on some condition.

For detailed example refer the below blog:

https://blogs.sap.com/2005/12/08/message-mapping-simplified-part-ii/

First check if the node exists using node function "exists" then use node function createif for conditional creation of the target node.

Thanks,

Binod