on 06-20-2017 6:03 PM
I am trying to create the Inventory in Warehouse Report with a date parameter, but I cannot get the query to work. I also cannot get the In Stock quantity from the OINM table and the InQty and OutQty fields don't seem to correspond to the Item Master Data. And I am trying it on HANA.
SELECT T1."WhsName", T0."ItemCode", MAX(T0."Dscription") AS "Item Name", SUM(T0."InQty" - T0."OutQty") AS "On Hand", T0."DocDate"
FROM OINM T0 INNER JOIN OWHS T1 ON T1."WhsCode" = T0."Warehouse"
WHERE T0."DocDate" <= '[%0]'
GROUP BY T1."WhsName", T0."ItemCode", T0."DocDate"
HAVING SUM(T0."InQty" - T0."OutQty") > 0
Any help is greatly appreciated.
Kind regards,
Vinolan Pillay
User | Count |
---|---|
95 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.