Hi all,
In my SAP Production Process,
I have planned qty=100, I Received this item as
rejected qty=2
completed qty=98.
I write query for this,but my query is not working.
this is my query:
DECLARE @a as NUMERIC
SET @a =(select ABS(a.PlannedQty-a.RjctQty -(select sum(quantity) from IGE1
where BaseRef = $[IGN1.BaseRef] and ItemCode = $[IGN1.ItemCode] and BaseLine = $[IGN1.BaseLine]))
from WOR1 a inner join OWOR b on a.DocEntry = b.DocEntry
where b.DocNum = $[IGN1.BaseRef] and a.ItemCode = $[IGN1.ItemCode] and a.LineNum = $[IGN1.BaseLine])
SELECT ISNULL(@a,0)