Skip to Content
0
Former Member
Jan 28, 2011 at 05:34 AM

Sales Order Vs Production

29 Views

Hi All,

I am trying to generate a report where I would like to get a list of all the sales order for which production order is not created.

We create a new item every time for each sales order and link the same to BoM.

The idea is to get a list of sales order where the item codes present in sales order are not in production order (item code).

Selection criteria should be date range and Item property (we are using just 4 item properties). Hope the requirement is clear.

This is the query which i have created but i am unable to get the conditions and joins right.

SELECT DISTINCT T0.[DocNum], T0.[DocDate], T0.[CardName], T1.[Dscription], T1.[Quantity], T1.[unitMsr]
 FROM ORDR T0  INNER JOIN 
  RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN 
 OITM T2 ON T1.ItemCode = T2.ItemCode, OWOR T3
wHERE T0.[DocDate] >='[%0]' and T0.[DocDate] <='[%1]' AND T0.[DocStatus] = 'O'

I also want the condition where T1.Itemcode not used in T3.Itemcode and only for the item property selected.

Thanks,

Joseph