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 a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.