Skip to Content
Nov 10, 2020 at 09:20 AM

Query For Hana SAP b1

223 Views Last edit Nov 10, 2020 at 09:52 AM 2 rev

Dear ,

I need a query for SAP b1 Last quote price for particular Item.

SELECT T1."ItemCode", T1."Price",T1."DocEntry" FROM OQUT T0 INNER JOIN QUT1 T1 ON T0."DocEntry" = T1."DocEntry" WHERE (T1."DocEntry"=(SELECT max(C."DocEntry") FROM qut1 C Left outer join OQUT D ON C."DocEntry"= D."DocEntry" where C."ItemCode"=T1."ItemCode" GROUP BY C."ItemCode" ) ) and T1."ItemCode"=[%0] GROUP BY T1."ItemCode",T1."Price",T1."DocEntry"

But this is wrong.Can help me with corrected one