R_CADOCUMENTTP

CDS View

Contract Accounting Document - TP

R_CADOCUMENTTP is a CDS View in S/4HANA. Contract Accounting Document - TP. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
A_CADocumentHeader view_entity projection CONSUMPTION Contract Accounting Document
C_CADocumentTP view_entity projection CONSUMPTION Document
I_CADocumentTP view_entity projection TRANSACTIONAL Document Header - TP
I_CADocumentUI view_entity from COMPOSITE Document UI Enhancements
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.privilegedAssociations: [ '_CADocumentChangeDocument' ]

@EndUserText.label: 'Contract Accounting Document - TP'

@ObjectModel: { representativeKey:      'CADocumentNumber',
                sapObjectNodeType.name: 'ContrAcctgDocument',
                usageType:               { dataClass:      #TRANSACTIONAL,
                                           sizeCategory:   #XXL,
                                           serviceQuality: #C } }

@VDM: { lifecycle.contract.type: #SAP_INTERNAL_API,
        viewType:                #TRANSACTIONAL }

define root view entity R_CADocumentTP
  as select from I_CADocument

  composition [0..*] of R_CADocumentBPItemTP as _BPItem
  composition [0..*] of R_CADocumentGLItemTP as _GLItem
   
  association [0..*] to I_CADocumentBPItemPaymentData as _BPItemPaytData on $projection.CADocumentNumber = _BPItemPaytData.CADocumentNumber
  association [0..*] to I_CADocumentGLItemPaymentData as _GLItemPaytData on $projection.CADocumentNumber = _GLItemPaytData.CADocumentNumber
  association [1..1] to I_CADocumentUI as _DocUI on $projection.CADocumentNumber = _DocUI.CADocumentNumber
  
  association [0..*] to I_ChangeDocument_2         as _CADocumentChangeDocument on  _CADocumentChangeDocument.ChangeDocObjectClass = 'MKK_BELEG'
                                                                                     and $projection.CADocumentNumber              = _CADocumentChangeDocument.ChangeDocObject
  
  // Key User Extensibility. Is registerd in transaction SCFD_REGISTRY. Do not change E_CADocumentHeader or alias _Extension without adopting CFD regestry entry

  association [1..1] to E_CADocumentHeader            as _Extension      on  $projection.CADocumentNumber = _Extension.CADocumentNumber

{
  key CADocumentNumber,
  
      CAReconciliationKey,
      CAApplicationArea,
      CADocumentType,
      CADocumentOriginCode,
      CreatedByUser,
      CreationDate,
      CreationTime,
      TransactionCurrency,
      DocumentDate,
      CAPostingDate,
      ExchangeRateDate,
      CAReferenceDocument,
      CAReturnReason,
      CAPostingReason,
      CASeparateDocIsCreatedInGL,
      ReferenceDocumentType,
      OriginalReferenceDocument,
      CAReversedDocumentNumber,
      CADocumentClass,
      CAClearingInformation,
      CATaxCompanyCode,
      CAReversalDocumentNumber,
      CADocumentSupplements,
      LogicalSystem,
      CADocumentVersion,
      CAWorkflowCheckReason,
      CAWorkflowCheckProcess,
      CADocumentTransactionClass,
      CADocumentTypeForGLTransfer,
      CADocContainsCashFlowItems,
      CAStorageLocationOfTaxSuplmnt,
      CATaxCodeWasExchanged,
      TaxReportingDate,
      TaxFulfillmentDate,
      CARequestedPeriodForGLTransfer,
      IsIndividualPosting,
      CADocumentIsAged,
      LastChangeDate,
      LastChangeTime,
      CAInvcgRefPostingDocType,
      CAInvoicingDocument,
      CA1stCountrySpecificReference,
      CAFirstCountrySpecificDate,
      CAClassificationKey,

      cast(dats_tims_to_tstmp(CreationDate, CreationTime, abap_system_timezone($session.client, 'NULL'), $session.client, 'NULL') as vdm_creationdatetime) as CreationDateTime,
      //etag

      @Semantics.systemDateTime.lastChangedAt: true
      case when ( LastChangeDate is initial or LastChangeDate is null )
        then cast( dats_tims_to_tstmp( LastChangeDate, LastChangeTime, 'UTC', $session.client, 'NULL') as vdm_lastchangedon )
        else cast( dats_tims_to_tstmp( CreationDate, CreationTime, 'UTC', $session.client, 'NULL') as vdm_lastchangedon )
      end                                                                 as LastChangeDateTime,
      
      /* Associations */
      // own association

      _BPItem,
      _GLItem,
      _BPItemPaytData,
      _GLItemPaytData,
      _DocUI,
      // associations from I_CADocument

      _CAApplicationArea,
      _CAClearingInformation,
      _CADocTransactionClass,
      _CADocumentClass,
      _CADocumentOriginCode,
      _CADocumentSupplement,
      _CADocumentType,
      _CADocumentVersion,
      _CAPostingReason,
      _CAReturnReason,
      _CARequestedSpecialPeriod,
      _CATaxCompanyCode,
      _CATaxSupplementStorageLoc,
      _CAWorkflowCheckProcess,
      _CAWorkflowCheckReason,
      _CreatedByUser,
      _TransactionCurrency,
      _CADocumentChangeDocument
}