Skip to Content

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

A/P Cash Discounts Query

Hello Experts,

I am trying to query the list of all Open AP Invoices which are eligible for Cash Discounts.

Scenario : For Instance in OEC Computers,I have the following Open documents in SAP

DocNum CardCode PostingDate DueDate PaymentTerms

110 V10000 06/18/2010 07/19/2010 2P10Net30 ( Eligible for 2 % discount if paid within 10 days from posting date)

114 V20000 06/18/2010 08/09/2010 2P10Net45 ( Eligible for 2 % discount if paid within 10 days from posting date)

Let us say a user wants to run a check today and would like to know what documents are eligible for cash discounts based on duedate 07/02/10.

I am using the following query but does not seems to be working exactly:

select t0.DocNum,t0.CardCode,t0.CardName

,t0.DocTotal as Amount

,t0.DocDate as PostingDate

,t0.DocDueDate as DueDate

,t1.PymntGroup as PaymentTerms

,t2.Discount

,t1.ExtraDays

,t2.NumOfDays

from OPCH t0 inner join OCTG t1 on t0.GroupNum=t1.GroupNum

inner join CDC1 t2 on t1.DiscCode=t2.CdcCode

where T0.DocDate>= '[%0]' AND T0.DocDueDate<= '[%1]'+DATEADD(DAY,10,t0.DocDate) and t0.DocStatus='O'

Any help would be appreciated.

Thanks,

Praneeth

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