cancel
Showing results for 
Search instead for 
Did you mean: 

Context change

former_member188791
Participant
0 Kudos

Hi Group,

In the Incoming file I have 10 filelds,in the target I need to map 5 source fields to 5 target fields

for another 5 fields I need to map to one target field with 5 times repeating that tag:

for ex: Source

<SRC>

<HSD1> 11</HSD1>

<HSD2> 12</HSD2>

<HSD3> 13</HSD3>

<HSD4> 14</HSD4>

<HSD5> 25</HSD5>

<HSD6> 26</HSD6>

<HSD7> 27</HSD7>

<HSD8> 28</HSD8>

<HSD9> 29</HSD9>

<HSD10> 30</HSD110>

</SRC>

Target:

<TRG>

<HTD1> 11</HTD1>

<HTD2> 12</HTD2>

<HTD3> 13</HTD3>

<HTD4> 14</HTD4>

<HTD5> 25</HTD5>

<VAL>26</VAL>

<VAL>27</VAL>

<VAL>28</VAL>

<VAL>29</VAL>

<VAL>30</VAL>

Can any body suggest how can achieve this

Regards,

Rajiv

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Map first five fields from source to target as one to one. for next 5 fields, Use duplicate subtree to store different values of source field to target

former_member188791
Participant
0 Kudos

Hi Bhaskar,

Thank you for your reply,but I cant created duplicate tree,because I am using XSD where VAL node appear only one time.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You just need to right click on target message structure in the message mapping screen and select duplicate subtree for the var field five times. Thats it. You dont need to touch xsd.

former_member188791
Participant
0 Kudos

Hi Bhaskar,

its helpful answer,my problme is solved,I have one general query if we have the reverse scenario like the below

how we will get the result:

Source is:

Target:

<TRG>

<HTD1> 11</HTD1>

<HTD2> 12</HTD2>

<HTD3> 13</HTD3>

<HTD4> 14</HTD4>

<HTD5> 25</HTD5>

<VAL>26</VAL>

<VAL>27</VAL>

<VAL>28</VAL>

<VAL>29</VAL>

<VAL>30</VAL>

Target:

----


<SRC>

<HSD1> 11</HSD1>

<HSD2> 12</HSD2>

<HSD3> 13</HSD3>

<HSD4> 14</HSD4>

<HSD5> 25</HSD5>

<HSD6> 26</HSD6>

<HSD7> 27</HSD7>

<HSD8> 28</HSD8>

<HSD9> 29</HSD9>

<HSD10> 30</HSD110>

</SRC>

Former Member
0 Kudos

>>if we have the reverse scenario like the below

use copyvalue function

val-copyvalue(0)-HSD6

val-copyvalue(1)-HSD7

in the same way do the mapping for rest of the fields...

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Yep. CopyValue Standard function will solve your need.

Answers (0)