I am developing an inventory report where i would like to get the quantity of items per warehouse' bin location;
Can anyone help me on how can i get the quantity of items in the warehouse' bin locations?
Is there a table where B1 maintain items and its quantity per bin location?
Thanks and Best Regards.
SELECT T0.DocNum, T1.ItemCode, T2.BatchNum, T5.BinCode, T4.WhsCode, T4.OnHandQty
FROM OPDN T0
INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OIBT T2 ON T2.BaseEntry = T0.DocEntry and T2.BaseType = 20
INNER JOIN OBTN T3 ON T3.ItemCode = T2.ItemCode and T2.BatchNum = T3.DistNumber and T2.SysNumber = T3.SysNumber
INNER JOIN OBBQ T4 ON T3.ItemCode = T4.ItemCode and T3.AbsEntry = T4.SnBMDAbs
INNER JOIN OBIN T5 ON T5.AbsEntry = T4.AbsEntry
WHERE T0.DocEntry = 442 -- DocEntry Number