on 01-15-2008 8:45 AM
dear all,
in my scenario my source file is:
Mat No Batch No Storage Loc Qty
1001 123 236 10.00
1001 123 236 25.00
1002 124 236 15.00
1003 125 237 42.00
1001 123 236 15.00
1003 125 237 18.00
and i want my target file should be like following:
Mat No Batch No Storage Loc Qty
1001 123 236 50.00
1002 124 236 15.00
1003 125 237 60.00
here we have sumed the quantity based on Mat no, Batch No, & storage location.
i have tried using the functions "sum" & 'count" in the mapping but is not able to get the required output.
Can any body please guide what should be the correct maping structure for this?
Warm Regards,
N.Jain
Edited by: nishu jain on Jan 15, 2008 9:46 AM
Hi Nishu,
Try using RemoveContext node function before sum function.
Thanks,
Maheshwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have used remove context and sum as the functions. Now what is happening is that quantity is getting added up fpr but in the output i am getting two records instead of one.
I have created only one DT and one MT. In mapping i am using same stucture at source and target.
Warm regards,
N.Jain
Hi Nishu,
Try using collapseContext after Sum.
You can find out whats happening in mapping in the queue........ Give some values in Test tab. Again come back to Mapping.......right click on ur function n click on disply queue....u can see whats inoput the function & what is output of function.
This will help you to analyze.
Thanks,
Maheshwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By using the function call you can do this.
Thanks & Regards,
Madan Mohan.k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For this requirement, you have to use UDF. By using UDF it can be achieved easly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
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.