P_RU_VATInvcJrnlLinkOutgInvc

DDL: P_RU_VATINVCJRNLLINKOUTGINVC SQL: PRUVATINVJLO Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_RU_INVJOURNAL

Invoice Linking: Outgoing invoices

P_RU_VATInvcJrnlLinkOutgInvc is a Consumption CDS View that provides data about "Invoice Linking: Outgoing invoices" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, P_RU_ReversalDocument) and exposes 16 fields with key fields CompanyCode, AccountingDocument, FiscalYear. Part of development package GLO_FIN_IS_VAT_RU_INVJOURNAL.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from
P_RU_ReversalDocument P_RU_ReversalDocument union_all

Annotations (7)

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

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
IsReversal IsReversal
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
OriginalDocument
OriginalDocumentYear
AccountingDocument AccountingDocument
FiscalYear FiscalYear
IsReversal IsReversal
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
OriginalDocument
OriginalDocumentYear
CompanyCodeCurrency CompanyCodeCurrency
@AbapCatalog.sqlViewName: 'PRUVATINVJLO'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_VATInvcJrnlLinkOutgInvc
  as select from I_JournalEntry

{
  key CompanyCode,
  key AccountingDocument,
  key FiscalYear,
      IsReversal,
      ReverseDocument,
      ReverseDocumentFiscalYear,

      cast( AccountingDocument          as firu_original_document      preserving type ) as OriginalDocument,
      cast( FiscalYear                  as firu_original_document_year preserving type ) as OriginalDocumentYear,

      CompanyCodeCurrency
}
where
      IsReversal                 = ''
  and JrnlEntryCntrySpecificRef2 not like 'NEG^%'

union all select from P_RU_ReversalDocument

{
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  IsReversal,

  ReverseDocument                                                                    as ReverseDocument,
  ReverseDocumentFiscalYear                                                          as ReverseDocumentFiscalYear,

  cast( ReverseDocument             as firu_original_document      preserving type ) as OriginalDocument,
  cast( ReverseDocumentFiscalYear   as firu_original_document_year preserving type ) as OriginalDocumentYear,
  CompanyCodeCurrency
}