on 11-02-2006 7:19 AM
HI ,
I have a issue on hand in mapping .
I am using message mapping to map the source to the target.
The issue is I have a item data in the source message which contains the Amount field . also it has some charge nodes also under it which also has a amount field.
what i need to do is to add all the amount fields from the charge item into the amount of the item field and then map it to the target.
the Source struct is some what as below
Item
|->Amount
|-> ChargeItem
|-> Amount
|-> ChargeItem
|-> Amount
Item(2)
|->Amount
|-> ChargeItem
|-> Amount
|-> ChargeItem
|-> Amount
The target required is somewhat like below
Item
|-> Amount (item(amount) + charge (amount))
Item (2)
|-> Amount (item(amount) + charge (amount))
Hope u can get the issue
Thanks
Nikhil
Hi,
You can use the statistical function SUM.
Make the context of chargeItem-->AMOUNT to ITEM and then use the STATISTICAL function SUM,
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
Thanks for the reply. but i have a question.
this will deal with the amount of the charge item but what about the amount of the amount field in item.
how can we take care of that too. as cannot map more than 1 field to the target.
and more over we have to add that field too to the sum of charge item
Thanks
Nikhil
Nikhil,
<i>this will deal with the amount of the charge item but what about the amount of the amount field in item.</i>
Write a simple UDF that will take the input of the SUM of AMount of Charge Item and the Amount field of item as inputs and sum these togther and map this to the target.
Regards,
bhavesh
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.