Planned production order – Shortage of components
Dear all,
The below query is useful to check shortage of components for planned production orders. This query is useful for the followings ways:
1. Planner can check and release available production orders
2. Planner can remind shortage of components to Purchase department.
Query:
SELECT
T0.[DocNum]’ProOrdNo’,T0.[OriginNum]’SalesOrdNo’, T0.[Project]’JobNo’,T0.[ItemCode], T1.[ItemCode], T2.[ItemName], T1.[PlannedQty]’PlannedCompQty’, T2.[OnHand], T2.[OnHand] – T1.[PlannedQty] AS ‘Qty Short’, T0.[DueDate], T2.[OnOrder]’QtyOrdVen’
FROM
OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
WHERE
T2.[OnHand] – T1.[PlannedQty] < 0 AND T0.[Status] = ‘P’ and T2.[OnOrder]=’0′ ORDER BY T0.[DueDate]
Hope it will be helpful.
Thanks & Regards,
Nagarajan