cancel
Showing results for 
Search instead for 
Did you mean: 

Error in mapping

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nishu,

Try using RemoveContext node function before sum function.

Thanks,

Maheshwari

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

By using the function call you can do this.

Thanks & Regards,

Madan Mohan.k

Former Member
0 Kudos

For this requirement, you have to use UDF. By using UDF it can be achieved easly.