WINDOWS Live Search

To contact me for any clarifications regarding any posts / information, please mail me at arijit [dot] basu [at] gmail [dot] com


Thursday, November 23, 2006

How to get quantity on hand for an item?


InventDim inventDim;

InventSum inventSum;
InventQty inventQty;
;
while select sum(postedQty), sum(received), sum(deducted), sum(registered),

sum(picked), sum(reservPhysical)
from InventSum group by itemId
join InventDim
where inventSum.inventDimId == inventDim.inventDimId &&
inventSum.itemId == 'A001' &&
inventDim.inventLocationId == 'GW'
{
inventQty = inventSum.PostedQty+inventSum.Received+inventSum.Deducted-
inventSum.Picked-inventSum.ReservPhysical;

}
info(strfmt('%1', inventQty));

No comments: