Skip to Content

QueryReport to list all production orders for Sales Orders

Hi to all

Bellow Query Helps to Bring  Production Orders for SO

QueryReport to list all production orders for Sales Orders

SELECT T2.[DocNum] as ‘SO No.’, T0.[DocNum] as ‘Production Order No.’, T0.[ItemCode] as ‘Product No.’,

T0.[PlannedQty]as ‘Quantity to Make’, T2.[CardName]as ‘Customer Name’, T0.[DueDate]as ‘Ship Date’,

T1.[ItemCode],T4.[ItemName] as ‘Item to Purchase’, T1.[PlannedQty]as ‘Quantity’,

T4.[IsCommited] as ‘Required For Assembly’, T4.[OnHand]as ‘In Stock’, T4.[OnOrder] as ‘ Total Incoming’

FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN ORDR T2 on T2.DocNum = T0.OriginNum

INNER JOIN OITM T4 ON T1.ItemCode = T4.ItemCode

where T0.[Status] <> ‘L’

GROUP BY T2.[DocNum], T0.[ItemCode],T0.[PlannedQty],

T0.[DocNum], T2.[CardName], T0.[DueDate], T1.[ItemCode],
T1.[PlannedQty],T4.[ItemName],T4.[IsCommited], T4.[OnHand],T4.[OnOrder]
order by T2.[DocNum]

Thanks&Regards

Andakondaramudu

Be the first to leave a comment
You must be Logged on to comment or reply to a post.