Skip to Content
Former Member
Jun 12, 2014 at 12:28 PM

How to sum up quantity per material without using loop


Dear Experts,

I have this problem, for example I have this table :

Material PO Quantity

MatA 0123 5

MatA 0124 3

MatB 0133 9

Here is the problem. The quantity could be edited, but the total of the quantity for one material must be the same after the edit, eg if u want to edit the quantity for MatA as 4 and 6, it will make error because the sum of it is 10, not 8. I look up for some method for this and came up with COLLECT syntax but that method using loop in it. This checking will be done everytime I edit the quantity so if I have to loop it everytime, I think that could use too much effort for system, especially if I have a lot of material. Do anyone have idea how to do it without using loop? Or another method that could be more simple and fast?

Thank you very much.


Shirley Xiao