AR Aging — Overdue Receivables
Every open customer invoice, sorted by how overdue it is — so you can see who owes you, who's late, and where to focus collections. Built on I_OperationalAcctgDocItem and tied to the customer sub-ledger.
Sample build of the AR Aging report — bucketed by net due date as of a key date, tied to the Manage Customer Line Items balance, and rendered tool-neutral so it runs in Power BI, SAC, or Tableau.
| Customer | Current | 1–30 | 31–60 | 60+ | Total |
|---|---|---|---|---|---|
| 100245 · Riverside Retail | 3,100,000 | 220,000 | — | — | 3,320,000 |
| 100318 · Summit Wholesale | 1,400,000 | 680,000 | 410,000 | 1,350,000 | 3,840,000 |
| 100402 · Cedar Foods | 2,250,000 | 140,000 | 60,000 | — | 2,450,000 |
| 100455 · Harbor Supply | 1,180,000 | 90,000 | 40,000 | — | 1,310,000 |
Open customer items are bucketed by net due date — invoice baseline date plus payment terms — as of the key date, by customer and company code, and tied to the Manage Customer Line Items balance.
Customer 100318 (Summit Wholesale) has 1.35M past 60 days — 35% of its balance — and it's already at dunning level 2. That's a collections and credit-risk signal, not normal lateness.
Route the 60-plus items to collections and escalate the dunning level before they age into bad debt. Clearing or disputing them lowers DSO and frees working capital.
The report's query logic — it reads the released CDS view I_OperationalAcctgDocItem (customer lines), works out each item's due date, and sorts it into aging buckets. The same SQL becomes a dbt model in your warehouse.
Show / hide SQL
WITH ar_open AS (
SELECT it.CompanyCode,
it.Customer,
it.GLAccount AS recon_account,
je.AccountingDocument,
je.FiscalYear,
it.AmountInCompanyCodeCurrency AS open_amount,
it.PaymentTerms,
it.NetPaymentDays,
ADD_DAYS(it.DocumentItemDate,
TO_INTEGER(it.NetPaymentDays)) AS net_due_date,
DAYS_BETWEEN(ADD_DAYS(it.DocumentItemDate,
TO_INTEGER(it.NetPaymentDays)),
:P_KEY_DATE) AS days_overdue
FROM I_JournalEntry AS je
JOIN I_OperationalAcctgDocItem AS it
ON je.CompanyCode = it.CompanyCode
AND je.AccountingDocument = it.AccountingDocument
AND je.FiscalYear = it.FiscalYear
WHERE it.FinancialAccountType = 'D' -- D = customer (Debitor)
AND it.CompanyCode = :P_COMPANY_CODE
AND it.ClearingDate IS NULL -- open as of the key date
)
SELECT Customer,
SUM(CASE WHEN days_overdue <= 0 THEN open_amount ELSE 0 END) AS current_not_due,
SUM(CASE WHEN days_overdue BETWEEN 1 AND 30 THEN open_amount ELSE 0 END) AS d_1_30,
SUM(CASE WHEN days_overdue BETWEEN 31 AND 60 THEN open_amount ELSE 0 END) AS d_31_60,
SUM(CASE WHEN days_overdue > 60 THEN open_amount ELSE 0 END) AS d_60_plus,
SUM(open_amount) AS total_open
FROM ar_open
GROUP BY Customer
ORDER BY d_60_plus DESC;The data-warehouse model — one fact surrounded by conformed dimensions (what you slice by) and measures (what you aggregate), expressed as dbt so it migrates with you. Grain: one row per open AR item.
| Element | Type | Definition |
|---|---|---|
| dim_customer | dimension | Customer — Business Partner (customer role), name, group |
| dim_company_code | dimension | Company code & ledger context |
| dim_gl_account | dimension | Reconciliation (receivables) account — RACCT |
| dim_date | dimension | Conformed calendar on the net due date |
| open_amount | measure | Open amount in company-code currency (HSL) |
| days_overdue | measure | Key date minus net due date |
| aging_bucket | measure | Current / 1–30 / 31–60 / 60+ derived from days_overdue |
Every source object behind this report. Each linked object has its own page — with its fields and its real S/4HANA status, so you build on the right thing.
| Object | Role | Key fields | S/4HANA status |
|---|---|---|---|
| I_OperationalAcctgDocItem | Customer line item with payment terms — the read object | released | Released CDS view |
| ACDOCA | Universal Journal — the open amount & account assignment | 6 PK · 360+ | Transparent table |
| BSEG | Open-item management & payment terms (baseline date, net days) | 4 PK | Transparent table |
| Business Partner | Customer master (customer role) — the dimension | BUT000 | Transparent table |
| BSID / BSAD | Legacy customer open/cleared index — reference only, do not extract | — | Compat view → ACDOCA |
| C_OverdueAcctRbls | SAP's standard overdue receivables / aging grid (Overdue Receivables app) — reference | released | Released CDS view |
- AR aging
- Open customer invoices grouped by how overdue they are.
- Net due date
- When an invoice is actually due: its baseline date plus the payment-term days.
- ACDOCA
- SAP's single table holding every finance posting (the "Universal Journal").
- BSEG
- The table that still manages open items and payment terms in S/4HANA.
- CDS view
- Core Data Services — an SAP-supplied, upgrade-safe view onto the data.
- I_OperationalAcctgDocItem
- The released view that gives the customer line with its terms (account type D = customer).
- Business Partner
- The single S/4HANA master for customers and suppliers (table BUT000).
- BSID / BSAD
- The old customer open / cleared tables — now compatibility views; don't extract them.
- DSO
- Days Sales Outstanding — the average days it takes customers to pay you.
- ODP-RFC
- An older extraction route SAP now bans for non-SAP tools (Note 3255746).
- star schema
- A simple, report-friendly layout: one "facts" table with "lookup" tables around it.