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:
Post a Comment