Sum of certain items in List View

Hi guys, Anyone know how to calculate certain items in list view using aggregate list? For example, I have three items with two of it have same lot number.  I want to calculate the quantity delivery for only same lot no.  I am using the aggregate list, but it calculate all lot no.
1 answers

Hi Ikhwan

Couple of things here,

So even if you are checking for the same lot no in your decision split, you are still taking the sum of the attribute from the SAPDataList list itself. You either create a separate empty list outside loop and add the SAPData object into this lis inside your loop and do the aggregate on the new list and change the DeliveryQ attribute value outside the loop.

BUT, this works for your current scenario where 2 Items in the list have Lot No 22M0100 and 1 item has Lot No 22M0200, would there be a scenario where another item may have Lot No 22M0200?