Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Production Status Report

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.

Former Member
Not what you were looking for? View more on this topic or Ask a question