P_CO_DIANInvoiceFinDocument

DDL: P_CO_DIANINVOICEFINDOCUMENT SQL: PSRCOINVFINDOC Type: view CONSUMPTION

P_CO_DIANInvoiceFinDocument is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntryItem, I_StRpJournalEntryLog) and exposes 16 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntryItem JournalEntryItem from
I_StRpJournalEntryLog ReportedItemsLog inner

Parameters (2)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PSRCOINVFINDOC view
VDM.private true view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.buffering.status #NOT_ALLOWED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor P_CO_DIANFrmt1001JrnlEntrOplVw view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_JournalEntryItem SourceLedger
KEY Ledger I_JournalEntryItem Ledger
KEY CompanyCode I_JournalEntryItem CompanyCode
KEY FiscalYear
KEY AccountingDocument I_JournalEntryItem AccountingDocument
KEY PurchasingDocument I_JournalEntryItem PurchasingDocument
KEY PurchasingDocumentItem I_JournalEntryItem PurchasingDocumentItem
StatryRptCategory I_StRpJournalEntryLog StatryRptCategory
StatryRptgEntity I_StRpJournalEntryLog StatryRptgEntity
StatryRptRunID I_StRpJournalEntryLog StatryRptRunID
_Ledger I_JournalEntryItem _Ledger
_CompanyCode I_JournalEntryItem _CompanyCode
_FiscalYear I_JournalEntryItem _FiscalYear
_JournalEntry I_JournalEntryItem _JournalEntry
_PurchasingDocument I_JournalEntryItem _PurchasingDocument
_PurchasingDocumentItem I_JournalEntryItem _PurchasingDocumentItem
@AbapCatalog.sqlViewName: 'PSRCOINVFINDOC'
@VDM.private:true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@VDM: {
  lifecycle.status: #DEPRECATED,
  lifecycle.successor: 'P_CO_DIANFrmt1001JrnlEntrOplVw'
}
define view P_CO_DIANInvoiceFinDocument
  with parameters
    P_FromPostingDate : fis_budat_from,
    P_ToPostingDate   : fis_budat_to
  as select from I_JournalEntryItem as JournalEntryItem
  
  inner join I_StRpJournalEntryLog as ReportedItemsLog on ReportedItemsLog.CompanyCode        = JournalEntryItem.CompanyCode
                                                      and ReportedItemsLog.AccountingDocument = JournalEntryItem.AccountingDocument
                                                      and ReportedItemsLog.FiscalYear         = JournalEntryItem.FiscalYear

{  
  key JournalEntryItem.SourceLedger,
  key JournalEntryItem.Ledger,
  key JournalEntryItem.CompanyCode,
  key cast( JournalEntryItem.FiscalYear as fis_gjahr_no_conv preserving type ) as FiscalYear,
  key JournalEntryItem.AccountingDocument,  
  key JournalEntryItem.PurchasingDocument,
  key JournalEntryItem.PurchasingDocumentItem,
      ReportedItemsLog.StatryRptCategory,
      ReportedItemsLog.StatryRptgEntity,
      ReportedItemsLog.StatryRptRunID,
      
      JournalEntryItem._Ledger,
      JournalEntryItem._CompanyCode,
      JournalEntryItem._FiscalYear,
      JournalEntryItem._JournalEntry,
      JournalEntryItem._PurchasingDocument,
      JournalEntryItem._PurchasingDocumentItem
}
where
      PostingDate between $parameters.P_FromPostingDate and $parameters.P_ToPostingDate
  and ( PurchasingDocument is not null and PurchasingDocument <> '' )
  and ( IsReversal is null or IsReversal = '' ) 
  and ( IsReversed is null or IsReversed = '' )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRYITEM",
"I_STRPJOURNALENTRYLOG"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_JOURNALENTRY",
"I_LEDGER",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM"
],
"BASE":
[
"I_JOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/