P_ClearingDocument

DDL: P_CLEARINGDOCUMENT SQL: PCLRGDOC Type: view CONSUMPTION Package: FINS_FIS_APAR_APPS

Helper View

P_ClearingDocument is a Consumption CDS View that provides data about "Helper View" in SAP S/4HANA. It reads from 2 data sources (P_ClearedItem1, I_JournalEntry) and exposes 15 fields with key fields CompanyCode, ClearingJournalEntry, ClearingJournalEntryFiscalYear. It has 1 association to related views. Part of development package FINS_FIS_APAR_APPS.

Data Sources (2)

SourceAliasJoin Type
P_ClearedItem1 ClrdItm inner
I_JournalEntry I_JournalEntry from

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_ClearedItemCorrespondenceCnt _CorrespondenceCnt $projection.CompanyCode = _CorrespondenceCnt.CompanyCode and $projection.ClearingJournalEntry = _CorrespondenceCnt.ClearingJournalEntry and $projection.ClearingJournalEntryFiscalYear = _CorrespondenceCnt.ClearingJournalEntryFiscalYear

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PCLRGDOC view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.authorizationCheck #NOT_ALLOWED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode
KEY ClearingJournalEntry
KEY ClearingJournalEntryFiscalYear
AccountingDocumentType I_JournalEntry AccountingDocumentType
AuthorizationGroup
IntercompanyTransaction I_JournalEntry IntercompanyTransaction
DocumentDate I_JournalEntry DocumentDate
PostingDate I_JournalEntry PostingDate
ClearingFiscalPeriod
ClearingCreationDate
AccountingDocCreatedByUser I_JournalEntry AccountingDocCreatedByUser
CompanyCodeCurrency I_JournalEntry CompanyCodeCurrency
AccountingDocumentCategory I_JournalEntry AccountingDocumentCategory
_CompanyCode I_JournalEntry _CompanyCode
_CorrespondenceCnt _CorrespondenceCnt
@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