Skip to content

CashDiscountUtilization

Source SQL File - Google Cloud Cortex Data Foundation

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

Overview

The AccountingDocumentsKPI view provides key performance indicators (KPIs) for accounting documents in SAP systems. It includes information such as the client, company code, company text, vendor account number, vendor name, accounting document number, amount in local currency, clearing date, document number of the clearing document, cash discount received in source currency, cash discount received in target currency, target currency, currency key, posting date in the document, target cash discount in source currency, and target cash discount in target currency.

Data Sources

Source Table/View Description
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.AccountsPayable Source table for Accounts Payable data
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.AccountingDocuments Source table for Accounting Documents data
{{ project_id_tgt }}.{{ dataset_reporting_tgt }}.VendorsMD Source table for Vendors Master Data

Key Use Cases

  • Analyzing cash discount performance
  • Identifying vendors with high cash discount potential
  • Monitoring vendor payment trends
  • Improving cash flow management

Query Logic

The view is created using a Common Table Expression (CTE) called AccountingDocumentsKPI. This CTE joins the AccountsPayable and AccountingDocuments tables on the client, company code, and accounting document number. It then calculates the target cash discount in source currency and target cash discount in target currency based on the posting key and clearing date. The main query then selects the necessary columns from the AccountingDocumentsKPI CTE and groups the results by client, company code, company text, vendor account number, vendor name, accounting document number, and target currency.

Possible relation with SAP Transactions

Transaction Code Transaction Description
FB03 Display Document
FBL1N Line Item Display: G/L Account
FBL3N Line Item Display: Document

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 Text
AccountNumberOfVendorOrCreditor_LIFNR Account Number of Vendor or Creditor
NAME1 Vendor Name
AccountingDocumentNumber_BELNR Accounting Document Number
TargetCurrency_TCURR Target Currency
CurrencyKey_WAERS Currency Key
AmountInLocalCurrency_DMBTR Amount in Local Currency
ClearingDate_AUGDT Clearing Date
DocumentNumberOfTheClearingDocument_AUGBL Document Number of the Clearing Document
PostingDateInTheDocument_BUDAT Posting Date in the Document
CashDiscountReceivedInSourceCurrency Cash Discount Received in Source Currency
CashDiscountReceivedInTargetCurrency Cash Discount Received in Target Currency
TargetCashDiscountInSourceCurrency Target Cash Discount in Source Currency
TargetCashDiscountInTargetCurrency Target Cash Discount in Target Currency

Comments