Skip to content

DaysPayableOutstanding

Source SQL File - Google Cloud Cortex Data Foundation

Google Cloud Cortex Foudantion - Cortex Reporting - (ecc) - DaysPayableOutstanding

Overview

The DaysPayableOutstanding view is a reporting view that calculates the Days Payable Outstanding (DPO) metric for SAP systems. DPO is a measure of how long it takes a company to pay its suppliers. The view calculates DPO for each company code and fiscal period, and it can be used to track DPO over time and compare it to industry benchmarks.

Data Sources

Source Table/View Description
AccountsPayable The AccountsPayable table contains data on accounts payable transactions. Each row in the table represents an invoice or other document that has been received from a supplier.
InventoryKeyMetrics The InventoryKeyMetrics table contains data on inventory key metrics, such as cost of goods sold (COGS). Each row in the table represents a month of data for a particular company code.

Key Use Cases

  • The DaysPayableOutstanding view can be used to track DPO over time and compare it to industry benchmarks.
  • The view can also be used to identify trends in DPO and to investigate the causes of high DPO.
  • The view can be used to support decision-making around supplier payment terms and working capital management.

Query Logic

The DaysPayableOutstanding view is created using a series of CTEs (Common Table Expressions). The first CTE, AccountsPayableAgg, aggregates the AccountsPayable table by client, company code, company text, target currency, fiscal year, and fiscal period. The second CTE, InventoryMetricsAgg, aggregates the InventoryKeyMetrics table by client, company code, fiscal year, fiscal period, and target currency. The third CTE, AccountsPayableKPI, joins the AccountsPayableAgg and InventoryMetricsAgg CTEs and calculates the DPO metric for each row. The final query selects the columns from the AccountsPayableKPI CTE and adds the NumberOfDays column, which is the number of days in the fiscal period.

Possible relation with SAP Transactions

Transaction Code Transaction Description
FBL1N Display Accounts Payable Line Items
FBL3N Display Accounts Payable Documents
FBL5N Display Accounts Payable Aging
FAGLL03 General Ledger: Display Line Items

Data Lineage

Under Development

Table/View Fields

Field Field Description Description in SAP Dictionary (Comming soon)
Client_MANDT Client ID
CompanyCode_BUKRS Company Code
CompanyText_BUTXT Company Name
FiscalYear Fiscal Year
FiscalPeriod Fiscal Period
TargetCurrency_TCURR Target Currency
PeriodAPInSourceCurrency Period Accounts Payable in Source Currency
PeriodAPInTargetCurrency Period Accounts Payable in Target Currency
COGSInSourceCurrency Cost of Goods Sold in Source Currency
COGSInTargetCurrency Cost of Goods Sold in Target Currency
NumberOfDays Number of Days in Fiscal Period
DaysPayableOutstandingInSourceCurrency Days Payable Outstanding in Source Currency
DaysPayableOutstandingInTargetCurrency Days Payable Outstanding in Target Currency

Comments