Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Query for Days to Pay

Former Member
0 Kudos
SELECT t2.docnum,t2.cardname,T2.[CardCode] ,t2.docstatus, T2.[DocDate] AS [Invoice Date], T2.[VatSum] AS [VAT Paid], t2.doctotal as [Invoiced Amount], t0.docdate as [Payment Date], T1.[SumApplied]

FROM ORCT T0 INNER JOIN RCT2 T1 ON T0.DocNum = T1.DocNum INNER JOIN OINV T2 ON T1.DocEntry = T2.DocEntry

WHERE t2.receiptnum=t1.docnum AND T2.[CardCode] = 'cardcode'

I have hit a fork in the road whilst creating my Days to Pay Query the aim of the Query is to display all the invoices based on a specific partner along with the posting date and payment date (if there is one) however I am unable to produce this whilst still including open invoices, please see the query below.

I am also certain that there are open invoices.

Thanks in advance.
  • SAP Managed Tags:
0 REPLIES 0