I_OplAcctgDocItemClrgHist
Accounting Doc Item Clearing History
I_OplAcctgDocItemClrgHist (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
OplAcctgDocItemClearingHistory · Accounting and Financial Close
I_OplAcctgDocItemClrgHist is a Basic CDS View (Dimension) that provides data about "Accounting Doc Item Clearing History" in SAP S/4HANA. It reads from 1 data source (bse_clr) and exposes 32 fields with key fields ClearingCompanyCode, ClearingAccountingDocument, ClearingFiscalYear, ClearingIndex. It has 11 associations to related views.
SAP Help Documentation
| Category | CDS Views for Transaction Data |
|---|---|
| Data Category | Dimension |
This CDS view provides access to all details of a clearing journal entry and to details of the corresponding cleared journal entry items. The most important attributes of a clearing are included, such as the cash discount, the payment differences, and the exchange rate differences. After a clearing reset using the Reset Cleared Items ( FBRA ) transaction, the clearing information of the cleared journal items involved is deleted from the journal entry, which then only shows the current status. You can use this CDS view to display all changes made to the cleared item. This CDS view provides the data to answer the following business questions: Which journal entry items were cleared? Which cash discount amount was applied? Which deductions were created? Which exchange rate differences were calculated? How many times was a journal entry cleared after a clearing reset? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .
Prerequisites
Authorizations Users who want to use this CDS view must have one of the following business catalogs assigned: SAP_FIN_BC_AP_ANALYTICS_PC SAP_FIN_BC_AP_CLEARING_PC SAP_FIN_BC_AP_DOC_DISP_PC SAP_FIN_BC_AR_ANALYTICS_PC SAP_FIN_BC_AR_CLEARING_PC SAP_FIN_BC_AR_DOC_DISP_PC SAP_FIN_BC_GL_ANALYTICS_PC SAP_FIN_BC_GL_JE_CLRING_PC SAP_FIN_BC_GL_REPORTING_PC
Structure
Attributes and Measures The main attributes are: Clearing Document Cleared Item Clearing Type Clearing Transaction Currency The main measures are: Amount in company code and in transaction currency Cash discount amount in company code and in transaction currency Payment differences in company code and in transaction currency Exchange rate difference Further Important Fields Important fields in this view include the following: Field Name Description Measure or Attribute ClearingAccountingDocument Clearing Journal Entry Attribute ClearedAccountingDocument Cleared Journal Entry Attribute ClearingItem Cleared Journal Entry Item Attribute ClearingType Clearing Type Attribute ClearingTransactionCurrency Clearing Transaction Currency Attribute AmountInCompanyCodeCurrency Amount in Company Code Currency Measure AmountInClrgTransCrcy Amount in Clearing Transaction Code Currency Measure CashDiscountAmtInCoCodeCrcy Cash Discount Amount in Company Code Currency Measure CashDiscountAmtInClrgTransCrcy Cash Discount Amount in Transaction Currency Measure DifferenceAmtInCoCodeCrcy Amount Difference in Company Code Currency Measure DifferenceAmtInClrgTransCrcy Payment Differences in Transaction Code Currency Measure ExchRateDiffAmtInCoCodeCrcy Exchange Rate Difference Realized Measure
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Accounting and Financial Close |
| Application Component | FI-FIO-GL-IS |
| Capabilities | Data Source in SQL Select, Data Provider for Analytical Queries, Data Source for Data Extraction, Data Source for Defining CDS Entities, Association Target for Defining CDS Entities, Analytical Dimension |
| Package | Accounting and Financial Close for SAP S/4HANA Cloud Private Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| bse_clr | bse_clr | from |
Associations (11)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CompanyCode | _ClearingCompanyCode | $projection.ClearingCompanyCode = _ClearingCompanyCode.CompanyCode |
| [1..1] | I_CompanyCode | _ClearedCompanyCode | $projection.ClearedCompanyCode = _ClearedCompanyCode.CompanyCode |
| [0..1] | I_JournalEntry | _ClearingDocument | $projection.ClearingAccountingDocument = _ClearingDocument.AccountingDocument and $projection.ClearingCompanyCode = _ClearingDocument.CompanyCode and $projection.ClearingFiscalYear = _ClearingDocument.FiscalYear |
| [0..1] | I_JournalEntry | _ClearedAccountingDocument | $projection.ClearedAccountingDocument = _ClearedAccountingDocument.AccountingDocument and $projection.ClearedCompanyCode = _ClearedAccountingDocument.CompanyCode and $projection.ClearedFiscalYear = _ClearedAccountingDocument.FiscalYear |
| [0..1] | I_OperationalAcctgDocItem | _ClearedItem | $projection.ClearedAccountingDocument = _ClearedItem.AccountingDocument and $projection.ClearedCompanyCode = _ClearedItem.CompanyCode and $projection.ClearedFiscalYear = _ClearedItem.FiscalYear and $projection.ClearedAccountingDocumentItem = _ClearedItem.AccountingDocumentItem |
| [0..1] | I_FiscalYearForCompanyCode | _ClearingFiscalYear | $projection.ClearingFiscalYear = _ClearingFiscalYear.FiscalYear and $projection.ClearingCompanyCode = _ClearingFiscalYear.CompanyCode |
| [0..1] | I_FiscalYearForCompanyCode | _ClearedFiscalYear | $projection.ClearedFiscalYear = _ClearedFiscalYear.FiscalYear and $projection.ClearedCompanyCode = _ClearedFiscalYear.CompanyCode |
| [0..1] | I_ClearingType | _ClearingType | $projection.ClearingType = _ClearingType.ClearingType |
| [0..1] | I_FinancialAccountType | _FinancialAccountType | $projection.FinancialAccountType = _FinancialAccountType.FinancialAccountType |
| [0..1] | I_Currency | _ClearingCompanyCodeCurrency | $projection.ClearingCompanyCodeCurrency = _ClearingCompanyCodeCurrency.Currency |
| [0..1] | I_Currency | _ClearingTransactionCurrency | $projection.ClearingTransactionCurrency = _ClearingTransactionCurrency.Currency |
Annotations (15)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Accounting Doc Item Clearing History | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.representativeKey | ClearingIndex | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| ObjectModel.sapObjectNodeType.name | OplAcctgDocItemClearingHistory | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.dataExtraction.enabled | true | view | |
| Analytics.internalName | #LOCAL | view |
Fields (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ClearingCompanyCode | Clearing Company Code | ||
| KEY | ClearingAccountingDocument | Clearing Accounting Document | ||
| KEY | ClearingFiscalYear | Clearing Fiscal Year | ||
| KEY | ClearingIndex | Sequential Number for Clearing Information | ||
| ClearedCompanyCode | Cleared Company Code | |||
| ClearedAccountingDocument | Cleared Accounting Document | |||
| ClearedFiscalYear | Cleared Fiscal Year | |||
| ClearedAccountingDocumentItem | Cleared Accounting Document Item | |||
| ClearingItem | agzei | Clearing Item | ||
| ClearingDownPaymentItem | Item Number of Down Payment in Clearing Document | |||
| ClearingType | Type of Clearing in Table AUSZ_CLR | |||
| ClearingTransactionCurrency | Transaction Currency of Clearing Document | |||
| ClearingCompanyCodeCurrency | Company Code Currency of Clearing Document | |||
| FinancialAccountType | Account type | |||
| AmountInCompanyCodeCurrency | Amount in Company Code Currency | |||
| AmountInInClrgTransCrcy | Amount in Clearing Transaction Currency | |||
| DifferenceAmtInCoCodeCrcy | Difference Amount In Company Code Currency | |||
| DifferenceAmtInClrgTransCrcy | Amount Difference in Clearing Transaction Currency | |||
| CashDiscountAmtInCoCodeCrcy | Cash Discount Amount in Company Code Currency | |||
| CashDiscountAmtInClrgTransCrcy | Cash Discount Amount in Clearing Transaction Currency | |||
| ExchRateDiffAmtInCoCodeCrcy | rdiff | Exchange Rate Gain/Loss Realized | ||
| _ClearingCompanyCode | _ClearingCompanyCode | |||
| _ClearedCompanyCode | _ClearedCompanyCode | |||
| _ClearedAccountingDocument | _ClearedAccountingDocument | |||
| _ClearedFiscalYear | _ClearedFiscalYear | |||
| _ClearedItem | _ClearedItem | |||
| _ClearingDocument | _ClearingDocument | |||
| _ClearingFiscalYear | _ClearingFiscalYear | |||
| _ClearingCompanyCodeCurrency | _ClearingCompanyCodeCurrency | |||
| _ClearingTransactionCurrency | _ClearingTransactionCurrency | |||
| _ClearingType | _ClearingType | |||
| _FinancialAccountType | _FinancialAccountType |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_OplAcctgDocItemClrgHist.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW I_OplAcctgDocItemClrgHist AS
SELECT
cast( bukrs_clr as fis_bukrs_clr preserving type ) AS ClearingCompanyCode,
cast( belnr_clr as fis_belnr_clr preserving type ) AS ClearingAccountingDocument,
cast( gjahr_clr as fis_gjahr_clr preserving type ) AS ClearingFiscalYear,
cast( index_clr as fis_index_clr preserving type ) AS ClearingIndex,
cast( bukrs as fis_bukrs_clrd preserving type ) AS ClearedCompanyCode,
cast( belnr as fis_belnr_clrd preserving type ) AS ClearedAccountingDocument,
cast( gjahr as fis_gjahr_clrd preserving type ) AS ClearedFiscalYear,
cast( buzei as fis_buzei_clrd preserving type ) AS ClearedAccountingDocumentItem,
agzei AS ClearingItem,
cast( agbuz as fis_agbuz preserving type ) AS ClearingDownPaymentItem,
cast( clrin as fis_clrin preserving type ) AS ClearingType,
cast( waers as fis_waers_clr preserving type ) AS ClearingTransactionCurrency,
cast( _ClearingCompanyCode.Currency as fis_hwaer_clr preserving type ) AS ClearingCompanyCodeCurrency,
cast( koart as farp_koart preserving type ) AS FinancialAccountType,
cast(dmbtr as fis_hsl preserving type ) AS AmountInCompanyCodeCurrency,
cast( wrbtr as fis_wrbtr_clr preserving type ) AS AmountInInClrgTransCrcy,
cast( difhw as fis_diff_amt_hsl preserving type ) AS DifferenceAmtInCoCodeCrcy,
cast( diffw as fis_diffw_clr preserving type ) AS DifferenceAmtInClrgTransCrcy,
cast( sknto as fis_sknto preserving type ) AS CashDiscountAmtInCoCodeCrcy,
cast( wskto as fis_wskto_clr preserving type ) AS CashDiscountAmtInClrgTransCrcy,
rdiff AS ExchRateDiffAmtInCoCodeCrcy
FROM bse_clr
LEFT OUTER JOIN I_CompanyCode AS _ClearingCompanyCode ON ClearingCompanyCode = _ClearingCompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _ClearedCompanyCode ON ClearedCompanyCode = _ClearedCompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_JournalEntry AS _ClearingDocument ON ClearingAccountingDocument = _ClearingDocument.AccountingDocument AND ClearingCompanyCode = _ClearingDocument.CompanyCode AND ClearingFiscalYear = _ClearingDocument.FiscalYear -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _ClearedAccountingDocument ON ClearedAccountingDocument = _ClearedAccountingDocument.AccountingDocument AND ClearedCompanyCode = _ClearedAccountingDocument.CompanyCode AND ClearedFiscalYear = _ClearedAccountingDocument.FiscalYear -- association [0..1]
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _ClearedItem ON ClearedAccountingDocument = _ClearedItem.AccountingDocument AND ClearedCompanyCode = _ClearedItem.CompanyCode AND ClearedFiscalYear = _ClearedItem.FiscalYear AND ClearedAccountingDocumentItem = _ClearedItem.AccountingDocumentItem -- association [0..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _ClearingFiscalYear ON ClearingFiscalYear = _ClearingFiscalYear.FiscalYear AND ClearingCompanyCode = _ClearingFiscalYear.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _ClearedFiscalYear ON ClearedFiscalYear = _ClearedFiscalYear.FiscalYear AND ClearedCompanyCode = _ClearedFiscalYear.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_ClearingType AS _ClearingType ON ClearingType = _ClearingType.ClearingType -- association [0..1]
LEFT OUTER JOIN I_FinancialAccountType AS _FinancialAccountType ON FinancialAccountType = _FinancialAccountType.FinancialAccountType -- association [0..1]
LEFT OUTER JOIN I_Currency AS _ClearingCompanyCodeCurrency ON ClearingCompanyCodeCurrency = _ClearingCompanyCodeCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_Currency AS _ClearingTransactionCurrency ON ClearingTransactionCurrency = _ClearingTransactionCurrency.Currency -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA