cancel
Showing results for 
Search instead for 
Did you mean: 

Help with mapping.

Former Member
0 Kudos
<?xml version="1.0" encoding="UTF-8"?>
<Movement actionCode = 06>
				<PrQuantity>
					<Quantity unitCode="KCK">1564.33</Quantity>
				</PrQuantity>
<Movement actionCode = 06>
				<PrQuantity>
					<Quantity unitCode="KCK">1564.33</Quantity>
				</PrQuantity>
<Movement actionCode = 01>
				<PrQuantity>
					<Quantity>1564.33</Quantity>
				</PrQuantity>
				<PrQuantity>
					<Quantity unitCode="KCK">1984.38</Quantity>
				</PrQuantity>
<Movement actionCode = 06>
				<PrQuantity>
					<Quantity>1564.33</Quantity>
				</PrQuantity>
				<PrQuantity>
					<Quantity unitCode="KCK">1345.33</Quantity>
				</PrQuantity>
<Movement actionCode = 02>
				<PrQuantity>
					<Quantity>1564.33</Quantity>
				</PrQuantity>
				<PrQuantity>
					<Quantity unitCode="KCK">1564.33</Quantity>
				</PrQuantity>

RootNode :

If Movement-actionCode == 01 or 02 Generate target node ( which I did and absoluately no problems with it)

There is a field mapping which needs your inputs. The field mapping is ...

If unitCode == KCK then send corresponding Quantity.

Catch here is, unitCode is a attribute with optional occurrence.

In the above fields, it has generated 2 target nodes based on the root condition (working fine)

But How do I set the field mapping.

It will generate following qty for 2 nodes as

1984.38

1564.33

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nikhil,

If you do the condition at root level and if you map at field level, it should populate because only the true values will come into the target root node. Please change the context of field level to the target and see.

If the above doesnot work then put the same condition at the field level and then change the context and then give a try.

Regards,

---Satish

Former Member
0 Kudos

My mapping is .....

If "unitCode" equalS "KCK" and

Movement-actionCode == 01 or 02

Then

Send "Quantity"

All the Quantity, unitCode, actionCOde are set to Movement context.

This mapping works if unitCode is not an optional field.

But I cannot use mapWithDefaults to make this possible as context of unitCode is set to Movement and setting the context to PrQuantity makes mapWithDefaults work but changing context below movement gives un expected results.

If I can set the mapWithDefaults to work with the context at movement it will work fine.

Thanks.

Former Member
0 Kudos

Hi Nikhil,

Since it is optional then it all depends upon your requirements now. Check with your functional or business user what to do in that case.

Regards,

---Satish

Former Member
0 Kudos

Thanks for your inputs Satish.

Checking with functional team is a later point.

Is there a way we can achieve this through PI mapping?

Thanks,

N

Former Member
0 Kudos

Hi Nikhil,

Until unless u hv other condition we have no other go. U can also use mapwithdefault in ur case, because if the condition fails this will trigger.

Regards,

---Satish

Former Member
0 Kudos

Please refer to my earlier post where I mentioned the mapping and conditions.

mapWithDefaults wasnt working as we have to set the context to Movement.

Is there way I can set the context of unitCode to Movement and still be able to check for the condition

help

Former Member
0 Kudos

Hi Nikhi,

Try to use if then conditon without else. Try changing the context with quantity. I am just wondering if you use mapwithdefault, what do you want to use the default value. If you know then it will work. If you dont know then it is back to square one where you need to check with functional user.

Regards,

---Satish

Former Member
0 Kudos

In my above MM added a new condition with formatByValue and it solved.

Thanks,

N

Edited by: Nikhil A on Sep 3, 2009 10:25 AM

Answers (0)