P_RU_CFinVatDocExtras

DDL: P_RU_CFINVATDOCEXTRAS SQL: PRUCFINVATEXTRAS Type: view CONSUMPTION

P_RU_CFinVatDocExtras is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_JournalEntry, I_Ru_VatDocExtras, I_Ru_VatDocExtras) and exposes 29 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocument, FiscalYear.

Data Sources (3)

SourceAliasJoin Type
I_JournalEntry JournalEntry inner
I_Ru_VatDocExtras VatDocExtras from
I_Ru_VatDocExtras VatDocExtras union_all

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PRUCFINVATEXTRAS view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_Ru_VatDocExtras CompanyCode
KEY AccountingDocument I_Ru_VatDocExtras AccountingDocument
KEY FiscalYear I_Ru_VatDocExtras FiscalYear
SenderLogicalSystem
SenderCompanyCode
SenderAccountingDocument
SenderFiscalYear
ExternalInvoice I_Ru_VatDocExtras ExternalInvoice
InvoiceDate I_Ru_VatDocExtras InvoiceDate
ExternalPayment I_Ru_VatDocExtras ExternalPayment
PaymentDate I_Ru_VatDocExtras PaymentDate
Supplier I_Ru_VatDocExtras Supplier
Customer I_Ru_VatDocExtras Customer
RU_IncomingInvoiceNumber I_Ru_VatDocExtras RU_IncomingInvoiceNumber
CompanyCode
KEY AccountingDocument I_JournalEntry AccountingDocument
KEY FiscalYear I_JournalEntry FiscalYear
SenderLogicalSystem I_JournalEntry SenderLogicalSystem
SenderCompanyCode I_JournalEntry SenderCompanyCode
SenderAccountingDocument I_JournalEntry SenderAccountingDocument
SenderFiscalYear I_JournalEntry SenderFiscalYear
ExternalInvoice I_Ru_VatDocExtras ExternalInvoice
InvoiceDate I_Ru_VatDocExtras InvoiceDate
ExternalPayment I_Ru_VatDocExtras ExternalPayment
PaymentDate I_Ru_VatDocExtras PaymentDate
Supplier I_Ru_VatDocExtras Supplier
Customer I_Ru_VatDocExtras Customer
RU_IncomingInvoiceNumber I_Ru_VatDocExtras RU_IncomingInvoiceNumber
RU_IncomingInvoiceDate I_Ru_VatDocExtras RU_IncomingInvoiceDate
@AbapCatalog.sqlViewName: 'PRUCFINVATEXTRAS'
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_CFinVatDocExtras
  as select from I_Ru_VatDocExtras as VatDocExtras

{
  key VatDocExtras.CompanyCode,
  key VatDocExtras.AccountingDocument,
  key VatDocExtras.FiscalYear,

      cast( '          ' as logsystem_sender    preserving type ) as SenderLogicalSystem,
      cast( '    '       as bukrs_sender        preserving type ) as SenderCompanyCode,
      cast( '          ' as fis_belnr_sender    preserving type ) as SenderAccountingDocument,
      cast( '0000'       as gjahr_sender        preserving type ) as SenderFiscalYear,

      VatDocExtras.ExternalInvoice,
      VatDocExtras.InvoiceDate,
      VatDocExtras.ExternalPayment,
      VatDocExtras.PaymentDate,
      VatDocExtras.Supplier,
      VatDocExtras.Customer,
      VatDocExtras.RU_IncomingInvoiceNumber,
      VatDocExtras.RU_IncomingInvoiceDate
}
where
  VatDocExtras.SenderLogicalSystem = ''

union all select from I_Ru_VatDocExtras as VatDocExtras

  inner join          I_JournalEntry    as JournalEntry on  JournalEntry.SenderCompanyCode        = VatDocExtras.CompanyCode
                                                        and JournalEntry.SenderAccountingDocument = VatDocExtras.AccountingDocument
                                                        and JournalEntry.SenderFiscalYear         = VatDocExtras.FiscalYear
                                                        and JournalEntry.SenderLogicalSystem      = VatDocExtras.SenderLogicalSystem

{
  key JournalEntry.CompanyCode,
  key JournalEntry.AccountingDocument,
  key JournalEntry.FiscalYear,

      JournalEntry.SenderLogicalSystem,
      JournalEntry.SenderCompanyCode,
      JournalEntry.SenderAccountingDocument,
      JournalEntry.SenderFiscalYear,

      VatDocExtras.ExternalInvoice,
      VatDocExtras.InvoiceDate,
      VatDocExtras.ExternalPayment,
      VatDocExtras.PaymentDate,
      VatDocExtras.Supplier,
      VatDocExtras.Customer,
      VatDocExtras.RU_IncomingInvoiceNumber,
      VatDocExtras.RU_IncomingInvoiceDate
}
where
      VatDocExtras.SenderLogicalSystem <> ''
  and JournalEntry.SenderLogicalSystem <> ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_RU_VATDOCEXTRAS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/