Skip to Content

Backdate Inventory in Warehouse Report

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers