Skip to Content
Former Member
Dec 19, 2008 at 05:12 PM

SAP Query for AR Aging Report


Hello Gurus-

I am trying to build a query for Aging report, and would like to include something like this:

Customer-Reference-Payment terms-Due date-Current-31-60days-61-90days-91-120days-over120days-toatal amount.

I have an infoset which includes BSID, KNA1, KNB1. I have maintained local fields:

Due Date = Baseline date + cash discount days

Statement Date = My input date.

Current = Condition (DUEDTE >= STATDTE - 30) formula (Amount)

31 - 60 Days = Condition (DUEDTE >= STATDTE - 60 AND DUEDTE < STATDTE - 30) formula (Amount)

61 - 90 Days = similar to above

91 - 120 Days = similar to above

Amount = - 1 * (If Debit credit indicator = "H" then "Amount in local currency") otherwise "Amt in Loc.Cur"

Over 120 Days = similar to above

When I enter a statement date of today it works hunky all looks current column looks good and do the rest. When i want to run this query as of couple of months ago (if today is 12/19/08 and i wanted to run my aging report for 10/31/08) it should give me aging as of my statement date 10/31/08 but it does not. It calculates the total amount as of today. I know because of local field "Amount" where i gave amount in local currency, but how would I tell that it should pick up amount in local currency till the statement date?

Any input in this regards is highly helpful.