Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
kothandaraman_nagarajan
Active Contributor

Dear all,

Please use below to query to find production order status for sales order lines. From this, you can know,

1. Production order status ----> Planned, Released, and closed

2. Production orders not created for sales orders

3. Production order planned quantity Vs. completed quantity

Query:

SELECT

T1.[DocNum] AS 'Prod Order',

T0.[DocNum] AS 'Sales Order',

T0.[NumAtCard] AS 'Cust PO',

T0.[CardCode]'CustCode',

T0.[CardName]'CustName',

T1.[ItemCode],

T1.[Status]'ProdStatus',

T1.[PlannedQty] as 'Planned Qty',

T1.[CmpltQty]'CompQty',

T1.[DueDate]

FROM

ORDR T0 left JOIN OWOR T1 ON T0.CardCode = T1.CardCode AND T0.DocNum = T1.OriginNum

WHERE

T0.[DocStatus] = 'O'

Order by  T0.[DocNum]

Hope helpful.

Thanks & Regards,

Nagarajan

Labels in this area