Skip to Content

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

Open Invoices older than 180 Days

Hi All,

Required the list of Open Invoices order than 180 days with the following fields :

Doc No

BP Code

BP Name

Doc Total

Balance Due

Ocrcode (Location)

Thanks and Regards,

Arbaaz Khan.

Former Member
Former Member replied

Try this:

SELECT DISTINCT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName, T0.DocTotal, (T0.DocTotal - T0.PaidToDate) 'Balance Due', T1.Ocrcode

FROM dbo.OINV T0

INNER JOIN dbo.INV1 T1 ON T1.DocEntry = T0.DocEntry

WHERE Datediff(dd, T0.docdate, Getdate()) > 180 AND T0.DocStatus = 'O'

Thanks,

Gordon

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question