I_CADocument

DDL: I_CADOCUMENT Type: view_entity BASIC

Contract Accounting Document

I_CADocument is a Basic CDS View that provides data about "Contract Accounting Document" in SAP S/4HANA. It reads from 1 data source (dfkkko) and exposes 62 fields with key field CADocumentNumber. It has 20 associations to related views.

SAP Help Documentation

CategoryCDS Views for Transaction Data
Purpose
This CDS view represents the header data of a Contract Accounting document. The most important data in the header structure of the Contract Accounting document is comprised of the document number, the reconciliation key, the document type, the document origin and the transaction currency. This CDS view provides the prerequisites for answering the following business questions: How many write-offs are posted in Contract Accounting (for a specific document origin)? In which transaction currencies are Contract Accounting documents posted?

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.

View on SAP Help Portal →

Data Sources (1)

SourceAliasJoin Type
dfkkko dfkkko from

Associations (20)

CardinalityTargetAliasCondition
[0..1] I_AccountingDocumentType _AccountingDocType $projection.CADocumentTypeForGLTransfer = _AccountingDocType.AccountingDocumentType
[1..1] I_CompanyCode _CompCode $projection.CATaxCompanyCode = _CompCode.CompanyCode
[1..1] I_Currency _Currency $projection.TransactionCurrency = _Currency.Currency
[1..1] I_CAApplicationArea _ApplArea $projection.CAApplicationArea = _ApplArea.CAApplicationArea
[0..1] I_CAClearingInformation _CAClearingInformation $projection.CAClearingInformation = _CAClearingInformation.CAClearingInformation
[1..1] I_CADocTransactionClass _CADocTransactionClass $projection.CADocumentTransactionClass = _CADocTransactionClass.CADocumentTransactionClass
[0..1] I_CADocumentClass _CADocumentClass $projection.CADocumentClass = _CADocumentClass.CADocumentClass
[1..1] I_CADocumentOriginCode _DocOriginCode $projection.CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode
[0..1] I_CADocumentSupplement _CADocumentSupplement $projection.CADocumentSupplements = _CADocumentSupplement.CADocumentSupplements
[1..1] I_CADocumentType _DocType $projection.CADocumentType = _DocType.CADocumentType and $projection.CAApplicationArea = _DocType.CAApplicationArea
[0..1] I_CADocumentVersion _CADocumentVersion $projection.CADocumentVersion = _CADocumentVersion.CADocumentVersion
[0..1] I_CAInvcgDocHeader _CAInvcgDocument $projection.CAInvoicingDocument = _CAInvcgDocument.CAInvoicingDocument
[0..1] I_CAInvcgRefPostgDocTyp _CAInvcgRefPostgDocType $projection.CAInvcgRefPostingDocType = _CAInvcgRefPostgDocType.CAInvcgRefPostingDocType
[0..1] I_CAPostingReason _CAPostingReason $projection.CADocumentOriginCode = _CAPostingReason.CADocumentOriginCode and $projection.CAPostingReason = _CAPostingReason.CAPostingReason
[0..*] I_CAReturnReason _CAReturnReason $projection.CAReturnReason = _CAReturnReason.CAReturnReason and _CAReturnReason.HouseBank is not initial
[1..1] I_CARequestedSpecialPeriod _CARequestedSpecialPeriod $projection.CARequestedPeriodForGLTransfer = _CARequestedSpecialPeriod.CARequestedPeriodForGLTransfer
[0..1] I_CATaxSupplementStorageLoc _CATaxSupplementStorageLoc $projection.CAStorageLocationOfTaxSuplmnt = _CATaxSupplementStorageLoc.CAStorageLocationOfTaxSuplmnt
[0..1] I_CAWorkflowCheckReason _WorkflowCheckReason $projection.CAWorkflowCheckReason = _WorkflowCheckReason.CAWorkflowCheckReason
[0..1] I_CAWorkflowCheckProcess _WorkflowCheckProcess $projection.CAWorkflowCheckProcess = _WorkflowCheckProcess.CAWorkflowCheckProcess
[1..1] E_CADocumentHeader _Extension $projection.CADocumentNumber = _Extension.CADocumentNumber

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Contract Accounting Document view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.representativeKey CADocumentNumber view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #BASIC view

Fields (62)

KeyFieldSource TableSource FieldDescription
KEY CADocumentNumber opbel Reopen
CAReconciliationKey fikey Reconcil. Key
CAApplicationArea applk ApplicationArea
CADocumentType blart Rep. rec. doc. type
CADocumentOriginCode herkf Origin
CreatedByUser User Name
CreationDate Imported On
CreationTime Time
TransactionCurrency Transaction Currency
DocumentDate Journal Entry Date
CAPostingDate budat Posting Date
ExchangeRateDate Translatn Date
CAReferenceDocument xblnr Reference
CAReturnReason rlgrd Returns Reason
CAPostingReason abgrd Write-Off Reas.
CASeparateDocIsCreatedInGL xeibh Single Document
ReferenceDocumentType Reference Document Type
OriginalReferenceDocument awkey RefKey GJE
CAReversedDocumentNumber Reversed Doc.
CADocumentClass bltyp Document Class
CAClearingInformation aginf Clearing Info
CATaxCompanyCode stbuk Tax comp. code
CAReversalDocumentNumber Revers.document
CADocumentSupplements appdx Doc supps
LogicalSystem awsys Logical System
CADocumentVersion versn Version
CAWorkflowCheckReason c4eye Check Reason
CAWorkflowCheckProcess c4eyp Process
CADocumentTransactionClass tatyp Transaction
CADocumentTypeForGLTransfer hbbla Tfr Doc. Type
CADocContainsCashFlowItems xcsha Cash Flow
CATaxCodeWasExchanged xtxch New Tax Code
TaxReportingDate Valid From
TaxFulfillmentDate fulfilldate Tax Settlement Date
CARequestedPeriodForGLTransfer wnper Special Period
IsIndividualPosting xsing Indiv. Posting
CADocumentIsAged xdaag Data Aging
LastChangeDate chdate Date Changed
LastChangeTime chtime Time Changed
CAInvcgRefPostingDocType cadoctype Ref. Doc. Type
CAInvoicingDocument invdocno Invoic. Doc.
CA1stCountrySpecificReference glo_ref1_hd Reference
CAFirstCountrySpecificDate glo_dat1_hd Date
_AccountingDocType _AccountingDocType
_ApplArea _ApplArea
_CAClearingInformation _CAClearingInformation
_CADocTransactionClass _CADocTransactionClass
_CADocumentClass _CADocumentClass
_CADocumentSupplement _CADocumentSupplement
_CADocumentVersion _CADocumentVersion
_CAInvcgDocument _CAInvcgDocument
_CAInvcgRefPostgDocType _CAInvcgRefPostgDocType
_CAPostingReason _CAPostingReason
_CAReturnReason _CAReturnReason
_CARequestedSpecialPeriod _CARequestedSpecialPeriod
_CATaxSupplementStorageLoc _CATaxSupplementStorageLoc
_CompCode _CompCode
_Currency _Currency
_DocType _DocType
_DocOriginCode _DocOriginCode
_WorkflowCheckProcess _WorkflowCheckProcess
_WorkflowCheckReason _WorkflowCheckReason

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_CADocument.
-- 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_CADocument AS
SELECT
  opbel AS CADocumentNumber,
  fikey AS CAReconciliationKey,
  applk AS CAApplicationArea,
  blart AS CADocumentType,
  herkf AS CADocumentOriginCode,
  cast(ernam as fclm_bam_created_by preserving type ) AS CreatedByUser,
  cast(cpudt as fis_cpdat preserving type) AS CreationDate,
  cast(cputm as ttet_dt_cr_time preserving type ) AS CreationTime,
  cast(waers as fis_rwcur preserving type ) AS TransactionCurrency,
  cast(bldat as fis_bldat preserving type ) AS DocumentDate,
  budat AS CAPostingDate,
  cast(wwert as vdm_v_exchange_rate_date preserving type ) AS ExchangeRateDate,
  xblnr AS CAReferenceDocument,
  rlgrd AS CAReturnReason,
  abgrd AS CAPostingReason,
  xeibh AS CASeparateDocIsCreatedInGL,
  cast(awtyp as fis_awtyp preserving type ) AS ReferenceDocumentType,
  awkey AS OriginalReferenceDocument,
  cast(stbel as stbel_gfn_kk preserving type ) AS CAReversedDocumentNumber,
  bltyp AS CADocumentClass,
  aginf AS CAClearingInformation,
  stbuk AS CATaxCompanyCode,
  cast(storb as storb_gfn_kk preserving type ) AS CAReversalDocumentNumber,
  appdx AS CADocumentSupplements,
  awsys AS LogicalSystem,
  versn AS CADocumentVersion,
  c4eye AS CAWorkflowCheckReason,
  c4eyp AS CAWorkflowCheckProcess,
  tatyp AS CADocumentTransactionClass,
  hbbla AS CADocumentTypeForGLTransfer,
  xcsha AS CADocContainsCashFlowItems,
  xtxch AS CATaxCodeWasExchanged,
  cast(vatdate as vatdate preserving type ) AS TaxReportingDate,
  fulfilldate AS TaxFulfillmentDate,
  wnper AS CARequestedPeriodForGLTransfer,
  xsing AS IsIndividualPosting,
  xdaag AS CADocumentIsAged,
  chdate AS LastChangeDate,
  chtime AS LastChangeTime,
  cadoctype AS CAInvcgRefPostingDocType,
  invdocno AS CAInvoicingDocument,
  glo_ref1_hd AS CA1stCountrySpecificReference,
  glo_dat1_hd AS CAFirstCountrySpecificDate
FROM dfkkko
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocType ON CADocumentTypeForGLTransfer = _AccountingDocType.AccountingDocumentType  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompCode ON CATaxCompanyCode = _CompCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON TransactionCurrency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_CAApplicationArea AS _ApplArea ON CAApplicationArea = _ApplArea.CAApplicationArea  -- association [1..1]
LEFT OUTER JOIN I_CAClearingInformation AS _CAClearingInformation ON CAClearingInformation = _CAClearingInformation.CAClearingInformation  -- association [0..1]
LEFT OUTER JOIN I_CADocTransactionClass AS _CADocTransactionClass ON CADocumentTransactionClass = _CADocTransactionClass.CADocumentTransactionClass  -- association [1..1]
LEFT OUTER JOIN I_CADocumentClass AS _CADocumentClass ON CADocumentClass = _CADocumentClass.CADocumentClass  -- association [0..1]
LEFT OUTER JOIN I_CADocumentOriginCode AS _DocOriginCode ON CADocumentOriginCode = _DocOriginCode.CADocumentOriginCode  -- association [1..1]
LEFT OUTER JOIN I_CADocumentSupplement AS _CADocumentSupplement ON CADocumentSupplements = _CADocumentSupplement.CADocumentSupplements  -- association [0..1]
LEFT OUTER JOIN I_CADocumentType AS _DocType ON CADocumentType = _DocType.CADocumentType AND CAApplicationArea = _DocType.CAApplicationArea  -- association [1..1]
LEFT OUTER JOIN I_CADocumentVersion AS _CADocumentVersion ON CADocumentVersion = _CADocumentVersion.CADocumentVersion  -- association [0..1]
LEFT OUTER JOIN I_CAInvcgDocHeader AS _CAInvcgDocument ON CAInvoicingDocument = _CAInvcgDocument.CAInvoicingDocument  -- association [0..1]
LEFT OUTER JOIN I_CAInvcgRefPostgDocTyp AS _CAInvcgRefPostgDocType ON CAInvcgRefPostingDocType = _CAInvcgRefPostgDocType.CAInvcgRefPostingDocType  -- association [0..1]
LEFT OUTER JOIN I_CAPostingReason AS _CAPostingReason ON CADocumentOriginCode = _CAPostingReason.CADocumentOriginCode AND CAPostingReason = _CAPostingReason.CAPostingReason  -- association [0..1]
LEFT OUTER JOIN I_CAReturnReason AS _CAReturnReason ON CAReturnReason = _CAReturnReason.CAReturnReason AND _CAReturnReason.HouseBank is not initial  -- association [0..*]
LEFT OUTER JOIN I_CARequestedSpecialPeriod AS _CARequestedSpecialPeriod ON CARequestedPeriodForGLTransfer = _CARequestedSpecialPeriod.CARequestedPeriodForGLTransfer  -- association [1..1]
LEFT OUTER JOIN I_CATaxSupplementStorageLoc AS _CATaxSupplementStorageLoc ON CAStorageLocationOfTaxSuplmnt = _CATaxSupplementStorageLoc.CAStorageLocationOfTaxSuplmnt  -- association [0..1]
LEFT OUTER JOIN I_CAWorkflowCheckReason AS _WorkflowCheckReason ON CAWorkflowCheckReason = _WorkflowCheckReason.CAWorkflowCheckReason  -- association [0..1]
LEFT OUTER JOIN I_CAWorkflowCheckProcess AS _WorkflowCheckProcess ON CAWorkflowCheckProcess = _WorkflowCheckProcess.CAWorkflowCheckProcess  -- association [0..1]
LEFT OUTER JOIN E_CADocumentHeader AS _Extension ON CADocumentNumber = _Extension.CADocumentNumber  -- association [1..1]
;