UDF and FMS not working

Can anyone correct my query on QUERY GENERATOR?

I need to auto populated my Origin Code UDF as when issue for production item maintain batch with field U_DEFECT.

SELECT T0.[U_DEFECT]
FROM OBTN T0
INNER JOIN IGE1 T1 ON T0.[ItemCode] = T1.[ItemCode]
WHERE T1.[ItemCode] = $[IGE1.ItemCode]
AND T0.[Quantity] > 0
AND T0.[ItemCode] = $[IGE1.ItemCode]

Scroll to Top