cancel
Showing results for 
Search instead for 
Did you mean: 

Value mapping For multiple source fields

Former Member
0 Kudos

Hi Experts,

                I have below condition, wanted to extract the values  from multiple source fields for a single target value.

                What can be the best solution.Please share your solution.

<A>

         <num="1" amount="800" />

         <B>

             <name="Raju" amount="500" />

         </B>

         <num="4" amount="700" />

</A>

Regards,

Rajesh.

Accepted Solutions (0)

Answers (1)

Answers (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Rajesh,

Can you please elaborate your Requirement?

We have got the Source Structure, but what you want to achieve at Target Structure?

Former Member
0 Kudos

Hi Sen,

i want to pass the values of name and num to amount...if name = raju then amount=500 as target....we use value mapping for single source field to target.i dnt knw for multiple fields from source to single field for target....Can you please share your thoughts....

Regards

Rajesh

nabendu_sen
Active Contributor
0 Kudos

Hi Rajesh,

You can go for Standard Function 'Fix Value' in your Message Mapping. You can maintain something like below:

If A = Raju B = 500

If A = XX   B = 500

If A = YY   B = 500

If A = DD   B = 600  etc.

Please find the below section 'Fix Values at Design time' of the blog:

http://saptechnical.com/Tutorials/XI/Graphicalmapping/conversions.htm

Please avoid this solution for large number of values or if you need to add values very frequently.

Former Member
0 Kudos

Hi Sen,

  Thank you for ur quick response...But the problem is source side is two different fields and target side is only one field....like this....

If A = Raju B = 500

and again another field from to the same target field

If C = Kumar B = 1000...

I have given an example XML file...Please Give me a solution for this...

Regards,

Rajesh

nabendu_sen
Active Contributor
0 Kudos

Hi Rajesh,

Then which value you want to save in Field B?

You can not pass 2 different values to the same Target field for the same occurrence of message. There should be some logic.