P_CLEARINGDOCUMENT

CDS View

P_CLEARINGDOCUMENT is a CDS View in S/4HANA. It contains 12 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_ClearingDocument view from CONSUMPTION Clearing Document

Fields (12)

KeyField CDS FieldsUsed in Views
KEY ClearingJournalEntry ClearingJournalEntry 1
KEY ClearingJournalEntryFiscalYear ClearingJournalEntryFiscalYear 1
KEY CompanyCode CompanyCode 1
KEY IntercompanyTransaction IntercompanyTransaction 1
AccountingDocCreatedByUser AccountingDocCreatedByUser 1
AccountingDocumentType AccountingDocumentType 1
AuthorizationGroup AuthorizationGroup 1
ClearingCreationDate ClearingCreationDate 1
ClearingFiscalPeriod ClearingFiscalPeriod 1
CompanyCodeCurrency CompanyCodeCurrency 1
DocumentDate DocumentDate 1
PostingDate PostingDate 1
@AbapCatalog.sqlViewName: 'PCLRGDOC'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true

define view P_ClearingDocument
  as select from I_JournalEntry

  inner join P_ClearedItem1 as ClrdItm on     I_JournalEntry.CompanyCode        = ClrdItm.CompanyCode
                                          and I_JournalEntry.AccountingDocument = ClrdItm.ClearingJournalEntry
                                          and I_JournalEntry.FiscalYear         = ClrdItm.ClearingJournalEntryFiscalYear                                                                                                                                                           

  association [0..1] to P_ClearedItemCorrespondenceCnt as _CorrespondenceCnt  on $projection.CompanyCode                     = _CorrespondenceCnt.CompanyCode
                                                                             and $projection.ClearingJournalEntry            = _CorrespondenceCnt.ClearingJournalEntry
                                                                             and $projection.ClearingJournalEntryFiscalYear  = _CorrespondenceCnt.ClearingJournalEntryFiscalYear

{
  key I_JournalEntry.CompanyCode,
  key cast(I_JournalEntry.AccountingDocument as fis_augbl preserving type)              as ClearingJournalEntry,
  key cast(I_JournalEntry.FiscalYear as fis_auggj_no_conv preserving type)              as ClearingJournalEntryFiscalYear,
      
      I_JournalEntry.AccountingDocumentType,
      I_JournalEntry._AccountingDocumentType.AuthorizationGroup,
      I_JournalEntry.IntercompanyTransaction, 
      I_JournalEntry.DocumentDate,
      I_JournalEntry.PostingDate,
      cast(I_JournalEntry.FiscalPeriod as fis_augperiod)               as ClearingFiscalPeriod,
      cast(I_JournalEntry.AccountingDocumentCreationDate as fis_augcp) as ClearingCreationDate,
      I_JournalEntry.AccountingDocCreatedByUser,
      I_JournalEntry.CompanyCodeCurrency,
      I_JournalEntry.AccountingDocumentCategory,
      I_JournalEntry._CompanyCode,
 
      _CorrespondenceCnt
}
group by
  I_JournalEntry.CompanyCode,
  I_JournalEntry.AccountingDocument,
  I_JournalEntry.FiscalYear,
  I_JournalEntry.AccountingDocumentType,
  I_JournalEntry._AccountingDocumentType.AuthorizationGroup,
  I_JournalEntry.IntercompanyTransaction,
  I_JournalEntry.DocumentDate,
  I_JournalEntry.PostingDate,
  I_JournalEntry.FiscalPeriod,
  I_JournalEntry.AccountingDocumentCreationDate,    
  I_JournalEntry.AccountingDocCreatedByUser,
  I_JournalEntry.CompanyCodeCurrency,
  I_JournalEntry.AccountingDocumentCategory
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_JOURNALENTRY",
"P_CLEAREDITEM1"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"P_CLEAREDITEMCORRESPONDENCECNT"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/