Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Query needed for SO-DC-Invoice Tracking

$
0
0

Hi Ramasamy,

 

Please try this query. Hope this will work. Its working for me.

---------

Select A.DocNum[SO No],H.ItmsGrpNam, G.ItemCode, G.ItemName, A.DocDate [SO DocDate], B.Quantity [So Qty], D.DocDate [DC Date], D.DocNum [DC No],C.Quantity [DC Qty], F.DocDate [Invoice Date], F.DocNum [Invoice No], E.Quantity [Inv Qty]

From ORDR A

  Inner Join RDR1 B on A.docEntry = B.DocEntry

  left Outer Join DLN1 C on C.BaseType = 17 and C.BaseEntry = B.DocEntry and C.BaseLine = B.LineNum

  left Outer Join ODLN D on C.docEntry = D.DocEntry and D.Canceled = 'N'

  left Outer Join INV1 E on E.BaseType = 15 and E.BaseEntry = C.DocEntry and E.BaseLine = C.LineNum

  left Outer Join OINV F on E.docEntry = F.DocEntry  and F.Canceled = 'N'

  Inner Join OITM G on B.ItemCode = G.ItemCode

  Inner Join OITB H on G.ItmsGrpCod = H.ItmsGrpCod

 

Where A.DocDate >=[%0] and A.DocDate <=[%1]

--------

 

Thank You!!!


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>