cancel
Showing results for 
Search instead for 
Did you mean: 

Production Status Report

former_member377094
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please repost as Document or Blog not as discussion.

Thank you for sharing information.