Skip to Content
0
Jan 09, 2019 at 01:24 PM

SAP B1 from different Warehouse Stock

249 Views

Hello,

I have different Warehouse. I want to find T0.[OnHand] >=2 for Warehouse 01 and T0.[OnHand] = 0 for Warehouse 02. I want to see only this Products. I tried but it is not working. How can I do that?

Thank you.

SELECT T1.[WhsCode], T0.[ItemCode], T0.[OnHand], T0.[ItemName],  , T1.[U_appBinLocation] as Lagerplatz
FROM OITM T0  
INNER JOIN OITW T1 ON T0.[ItemCode] = T1.[ItemCode] 
WHERE (T0.[OnHand] >= 2 AND T1.[WhsCode] = '01') AND (T0.[OnHand] = 0 AND T1.[WhsCode] = '02')  AND T0.[frozenFor] = 'N'