Skip to Content
0
Former Member
Aug 17, 2012 at 10:54 AM

Query for Receipt from Production

654 Views

Dear Experts,

In the below query please add selection criteria Production Date to Receipt Date and Product Code for selection.

SELECT T0.[DocNum] 'PO No.', T0.status 'Status',T0.POSTDATE, T0.[ItemCode], T1.[ItemName],

T0.[PlannedQty], T2.DocEntry 'Rec Doc', T3.DocDate 'Rec Date', T2.[Quantity], T2.LineTotal 'FG Value',

Sum(T4.LineTotal) 'RM Value' FROM OWOR T0 Inner Join OITM T1 On T0.ItemCode=T1.ItemCode

LEFT JOIN IGN1 T2 On T0.DocNum=T2.BaseRef And T0.ItemCode=T2.ItemCode Left Join OIGN T3

On T2.DocEntry=T3.DocEntry LEFT JOIN IGE1 T4 On T0.DocNum=T4.BaseRef Left Join OIGE T5

On T4.DocEntry=T5.DocEntry

--Where T2.WhsCode='09'

GROUP BY T0.[DocNum] , T0.[ItemCode], T1.[ItemName], T0.[PlannedQty], T2.[Quantity], T2.DocEntry,

T0.status,T0.POSTDATE, T3.DocDate, T2.LineTotal

Regards

Amol