I_CAWriteOffHistory
Write Off History
I_CAWriteOffHistory is a Basic CDS View that provides data about "Write Off History" in SAP S/4HANA. It reads from 1 data source (dfkkwoh) and exposes 27 fields with key fields CAWriteOffDocumentNumber, CADocumentNumber, CARepetitionItemNumber, CABPItemNumber, CASubItemNumber. It has 10 associations to related views.
SAP Help Documentation
| Category | CDS Views for Transaction Data |
|---|---|
| Data Category | Fact |
Purpose
This CDS view represents the write-off history data of a write-off in Contract Accounting . The most important data in the history structure of the write-off is comprised of the write-off document, document business partner item which is written off, business partner, contract account, write-off reason, and write-off date. This CDS view provides the prerequisites for answering the following business questions: Which document business partner items are written off by a given write-off document? How many write-offs are posted to a given business partner? 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 The SAP_A4C_BC_DEV_TST_FICA_PC ( Development - API Test - Contract Accounting ) business catalog needs to be assigned to a user to be able to use this CDS view.
Data Extraction
Data Extraction Type This CDS view is enabled for data extraction in full mode as well as in delta mode. Deltas are determined automatically by change data capture. Corresponding DataSource (Extractor) SAP does not deliver an extractor for write-offs. In SAP Business Warehouse (SAP BW) write-offs can be determined by the 0FC_CI_01 (FICA Cleared Items for Interval) DataSource.
This CDS view represents the write-off history data of a write-off in Contract Accounting . The most important data in the history structure of the write-off is comprised of the write-off document, document business partner item which is written off, business partner, contract account, write-off reason, and write-off date. This CDS view provides the prerequisites for answering the following business questions: Which document business partner items are written off by a given write-off document? How many write-offs are posted to a given business partner? 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 The SAP_A4C_BC_DEV_TST_FICA_PC ( Development - API Test - Contract Accounting ) business catalog needs to be assigned to a user to be able to use this CDS view.
Data Extraction
Data Extraction Type This CDS view is enabled for data extraction in full mode as well as in delta mode. Deltas are determined automatically by change data capture. Corresponding DataSource (Extractor) SAP does not deliver an extractor for write-offs. In SAP Business Warehouse (SAP BW) write-offs can be determined by the 0FC_CI_01 (FICA Cleared Items for Interval) DataSource.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| dfkkwoh | dfkkwoh | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_BusinessPartner | _BusinessPartner | $projection.BusinessPartner = _BusinessPartner.BusinessPartner |
| [1..1] | I_CADocumentBPItemPhysical | _DocBPItem | $projection.CADocumentNumber = _DocBPItem.CADocumentNumber and $projection.CARepetitionItemNumber = _DocBPItem.CARepetitionItemNumber and $projection.CABPItemNumber = _DocBPItem.CABPItemNumber and $projection.CASubItemNumber = _DocBPItem.CASubItemNumber |
| [1..1] | I_CADocumentHeader | _DocHeader | $projection.CADocumentNumber = _DocHeader.CADocumentNumber |
| [1..1] | I_CADocumentHeader | _WriteOffDocHeader | $projection.CAWriteOffDocumentNumber = _WriteOffDocHeader.CADocumentNumber |
| [1..1] | I_CADocumentOriginCode | _DocOriginCode | $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode |
| [1..1] | I_CAWriteOffReason | _WriteOffReason | $projection.CAWriteOffReason = _WriteOffReason.CAWriteOffReason |
| [1..1] | I_ContractAccountPartner | _ContractAccountPartner | $projection.BusinessPartner = _ContractAccountPartner.BusinessPartner and $projection.ContractAccount = _ContractAccountPartner.ContractAccount |
| [1..1] | I_ContractAccountHeader | _ContractAccount | $projection.ContractAccount = _ContractAccount.ContractAccount |
| [1..1] | I_CompanyCode | _CompCode | $projection.CompanyCode = _CompCode.CompanyCode |
| [1..1] | I_Currency | _Currency | $projection.TransactionCurrency = _Currency.Currency |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Write Off History | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #BASIC | view |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CAWriteOffDocumentNumber | Write-OffDocNo. | ||
| KEY | CADocumentNumber | Reopen | ||
| KEY | CARepetitionItemNumber | opupw | Repetition Item | |
| KEY | CABPItemNumber | opupk | Item | |
| KEY | CASubItemNumber | opupz | Subitem | |
| CompanyCode | bukrs | Value | ||
| BusinessPartner | Tech. BPartner | |||
| ContractAccount | Tech. CtrAcct | |||
| TransactionCurrency | Transaction Currency | |||
| CAAmountInTransactionCurrency | betrw | Reduction Amt | ||
| CAWriteOffReason | abgrd | Write-Off Reas. | ||
| CAWriteOffDate | abdat | Store Until | ||
| CADocumentOriginCode | herkf | Origin | ||
| CADocumentType | blart | Rep. rec. doc. type | ||
| CAWriteOffIsReversed | xrvsd | Reversed | ||
| CAMassRunDate | Run On | |||
| CAMassRunID | Settlement ID | |||
| _BusinessPartner | _BusinessPartner | |||
| _ContractAccount | _ContractAccount | |||
| _ContractAccountPartner | _ContractAccountPartner | |||
| _CompCode | _CompCode | |||
| _Currency | _Currency | |||
| _DocBPItem | _DocBPItem | |||
| _DocHeader | _DocHeader | |||
| _DocOriginCode | _DocOriginCode | |||
| _WriteOffDocHeader | _WriteOffDocHeader | |||
| _WriteOffReason | _WriteOffReason |
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_CAWriteOffHistory.
-- 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_CAWriteOffHistory AS
SELECT
cast( abbel as abbel_gfn_kk preserving type ) AS CAWriteOffDocumentNumber,
cast( opbel as opbel_gfn_kk preserving type ) AS CADocumentNumber,
opupw AS CARepetitionItemNumber,
opupk AS CABPItemNumber,
opupz AS CASubItemNumber,
bukrs AS CompanyCode,
cast( gpart as bu_partner preserving type ) AS BusinessPartner,
cast( vkont as corr_vkont_kk preserving type ) AS ContractAccount,
cast( waers as fis_rwcur preserving type ) AS TransactionCurrency,
betrw AS CAAmountInTransactionCurrency,
abgrd AS CAWriteOffReason,
abdat AS CAWriteOffDate,
herkf AS CADocumentOriginCode,
blart AS CADocumentType,
xrvsd AS CAWriteOffIsReversed,
cast( laufd as laufd_gfn_kk preserving type ) AS CAMassRunDate,
cast( laufi as laufi_gfn_kk preserving type ) AS CAMassRunID
FROM dfkkwoh
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON BusinessPartner = _BusinessPartner.BusinessPartner -- association [1..1]
LEFT OUTER JOIN I_CADocumentBPItemPhysical AS _DocBPItem ON CADocumentNumber = _DocBPItem.CADocumentNumber AND CARepetitionItemNumber = _DocBPItem.CARepetitionItemNumber AND CABPItemNumber = _DocBPItem.CABPItemNumber AND CASubItemNumber = _DocBPItem.CASubItemNumber -- association [1..1]
LEFT OUTER JOIN I_CADocumentHeader AS _DocHeader ON CADocumentNumber = _DocHeader.CADocumentNumber -- association [1..1]
LEFT OUTER JOIN I_CADocumentHeader AS _WriteOffDocHeader ON CAWriteOffDocumentNumber = _WriteOffDocHeader.CADocumentNumber -- association [1..1]
LEFT OUTER JOIN I_CADocumentOriginCode AS _DocOriginCode ON CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode -- association [1..1]
LEFT OUTER JOIN I_CAWriteOffReason AS _WriteOffReason ON CAWriteOffReason = _WriteOffReason.CAWriteOffReason -- association [1..1]
LEFT OUTER JOIN I_ContractAccountPartner AS _ContractAccountPartner ON BusinessPartner = _ContractAccountPartner.BusinessPartner AND ContractAccount = _ContractAccountPartner.ContractAccount -- association [1..1]
LEFT OUTER JOIN I_ContractAccountHeader AS _ContractAccount ON ContractAccount = _ContractAccount.ContractAccount -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompCode ON CompanyCode = _CompCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON TransactionCurrency = _Currency.Currency -- association [1..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