on 04-12-2016 12:11 PM
Dear All Expert,
Pls find below query which one is production status report.
Select T0.Docentry,T0.DocNum,T0.PostDate,T0.DueDate,(Case when T0.Status='L' then 'Closed' when T0.Status='R' then 'Realesed' when T0.Status='C' then 'Cancelled' end) as 'Status',
T0.ItemCode,T2.Itemname,T0.plannedQty,T0.CmpltQty,T0.RjctQty,T1.Itemcode,T3.ItemName,T1.plannedQty,T1.IssuedQty,T1.VisOrder as 'Row'
from OWOR T0
Left Outer Join WOR1 T1 on T1.Docentry=T0.Docentry
Left Outer Join OITM T2 on T0.itemcode=T2.Itemcode
Left Outer Join OITM T3 on T3.Itemcode=T1.ItemCode
Where T0.PostDate>='[%0]' AND T0.PostDate<='[%1]' And T1.VisOrder=0
Union All
Select T0.Docentry,Null as DocNum,Null as PostDate,Null as DueDate,Null as 'Status',
Null as ItemCode,Null as Itemname,Null as plannedQty,Null as CmpltQty,Null as RjctQty,T1.Itemcode,T3.ItemName,T1.plannedQty,T1.IssuedQty,T1.VisOrder as 'Row'
from OWOR T0
Left Outer Join WOR1 T1 on T1.Docentry=T0.Docentry
Left Outer Join OITM T2 on T0.itemcode=T2.Itemcode
Left Outer Join OITM T3 on T3.Itemcode=T1.ItemCode
Where T0.PostDate>='[%0]' AND T0.PostDate<='[%1]' And T1.VisOrder>0
Order by T0.Docentry,T1.visorder
Hope it is useful to other.
Regards,
Pratik Patel D.
Hi,
Please repost as Document or Blog not as discussion.
Thank you for sharing information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.