I_OplAcctgDocItemClrgHist

DDL: I_OPLACCTGDOCITEMCLRGHIST Type: view_entity BASIC

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

CategoryCDS Views for Transaction Data
Data CategoryDimension
Purpose
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

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessAccounting and Financial Close
Application ComponentFI-FIO-GL-IS
CapabilitiesData 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
PackageAccounting and Financial Close for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
bse_clr bse_clr from

Associations (11)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;