P_CollsAcctDoc

DDL: P_COLLSACCTDOC Type: view COMPOSITE

P_CollsAcctDoc is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_CollsSgmtCompanyCodeAssgmt, I_OperationalAcctgDocItem) and exposes 10 fields with key fields CollectionSegment, CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem.

Data Sources (2)

SourceAliasJoin Type
I_CollsSgmtCompanyCodeAssgmt I_CollsSgmtCompanyCodeAssgmt from
I_OperationalAcctgDocItem I_OperationalAcctgDocItem inner

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PCOLLSACCTDOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey AccountingDocument view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY CollectionSegment CollectionSegment
KEY CompanyCode I_CollsSgmtCompanyCodeAssgmt CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
KEY AccountingDocumentItem AccountingDocumentItem
Customer Customer
NetDueDate NetDueDate
AmountInTransactionCurrency AmountInTransactionCurrency
TransactionCurrency TransactionCurrency
clientNULLNetDueDateasDaysToDueDate
@AbapCatalog: { sqlViewName: 'PCOLLSACCTDOC',
                compiler: { compareFilter: true },
                preserveKey: true }
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
                  personalData:       { blocking: #BLOCKED_DATA_EXCLUDED } }
@VDM: { viewType: #COMPOSITE,
        private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #A,
                             sizeCategory: #L,
                             dataClass: #TRANSACTIONAL },
                representativeKey: 'AccountingDocument' }
define view P_CollsAcctDoc
  as select from I_CollsSgmtCompanyCodeAssgmt
    inner join   I_OperationalAcctgDocItem on I_CollsSgmtCompanyCodeAssgmt.CompanyCode = I_OperationalAcctgDocItem.CompanyCode
{

      // VDM Fields

  key CollectionSegment,
  key I_CollsSgmtCompanyCodeAssgmt.CompanyCode,
  key AccountingDocument,
  key FiscalYear,
  key AccountingDocumentItem,
      Customer,
      NetDueDate,

      @Semantics: { amount: { currencyCode: 'TransactionCurrency' } }
      AmountInTransactionCurrency,

      @Semantics: { currencyCode: true }
      TransactionCurrency,

      // Calculate due/Overdue dates (Positive -> Due in, Negative -> Overdue since

      dats_days_between( tstmp_to_dats( tstmp_current_utctimestamp(),
                                        abap_system_timezone( $session.client,'NULL' ),
                                        $session.client,
                                        'NULL' ), NetDueDate ) as DaysToDueDate

}

where
      FinancialAccountType = 'D'
  and ClearingDate         = '00000000'
  and TransactionCurrency  is not initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COLLSSGMTCOMPANYCODEASSGMT",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/