P_RU_DSVATReporting0

DDL: P_RU_DSVATREPORTING0 SQL: PRUDSVATRPTG0 Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_RU

VAT Reporting: Primary Document Selection-0

P_RU_DSVATReporting0 is a Consumption CDS View that provides data about "VAT Reporting: Primary Document Selection-0" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, P_RU_ReverseDocument) and exposes 26 fields. Part of development package GLO_FIN_IS_VAT_RU.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from
P_RU_ReverseDocument P_RU_ReverseDocument union_all

Annotations (6)

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

Fields (26)

KeyFieldSource TableSource FieldDescription
CompanyCode I_JournalEntry CompanyCode
AccountingDocument I_JournalEntry AccountingDocument
FiscalYear I_JournalEntry FiscalYear
AccountingDocumentType I_JournalEntry AccountingDocumentType
PostingDate I_JournalEntry PostingDate
TaxReportingDate I_JournalEntry TaxReportingDate
IsReversal I_JournalEntry IsReversal
IsReversed I_JournalEntry IsReversed
ReverseDocument I_JournalEntry ReverseDocument
ReverseDocumentFiscalYear I_JournalEntry ReverseDocumentFiscalYear
ReverseDocumentTaxRepDate
SrcDocNmbrForOriginalDocument I_JournalEntry AccountingDocument
SrcDocYearForOriginalDocument I_JournalEntry FiscalYear
AccountingDocument AccountingDocument
FiscalYear FiscalYear
AccountingDocumentType AccountingDocumentType
PostingDate PostingDate
TaxReportingDate TaxReportingDate
IsReversal IsReversal
IsReversed IsReversed
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
ReverseDocumentTaxRepDate ReverseDocumentTaxRepDate
SrcDocNmbrForOriginalDocument SrcDocNmbrForOriginalDocument
SrcDocYearForOriginalDocument SrcDocYearForOriginalDocument
SrcDocTypeForOriginalDocument SrcDocTypeForOriginalDocument
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRUDSVATRPTG0'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_DSVATReporting0
  as select from           I_JournalEntry

    left outer to one join P_RU_CFinPseudoReversedDoc1 as ReversedDoc on  ReversedDoc.CompanyCode                = I_JournalEntry.CompanyCode
                                                                      and ReversedDoc.OriginalAccountingDocument = I_JournalEntry.AccountingDocument
                                                                      and ReversedDoc.OriginalFiscalYear         = I_JournalEntry.FiscalYear

{
  I_JournalEntry.CompanyCode,
  I_JournalEntry.AccountingDocument,
  I_JournalEntry.FiscalYear,
  I_JournalEntry.AccountingDocumentType,
  I_JournalEntry.PostingDate,
  I_JournalEntry.TaxReportingDate,

  I_JournalEntry.IsReversal,
  I_JournalEntry.IsReversed,
  I_JournalEntry.ReverseDocument,
  I_JournalEntry.ReverseDocumentFiscalYear,
  cast( '00000000' as vatdate )         as ReverseDocumentTaxRepDate,

  I_JournalEntry.AccountingDocument     as SrcDocNmbrForOriginalDocument,
  I_JournalEntry.FiscalYear             as SrcDocYearForOriginalDocument,
  I_JournalEntry.AccountingDocumentType as SrcDocTypeForOriginalDocument
}
where
      I_JournalEntry.IsReversal                 = ''
  and I_JournalEntry.IsReversed                 = ''
  and I_JournalEntry.JrnlEntryCntrySpecificRef2 not like 'NEG^%'
  and ReversedDoc.CompanyCode                   is null

union all select from P_RU_ReverseDocument

{
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentType,
  PostingDate,
  TaxReportingDate,

  IsReversal,
  IsReversed,
  ReverseDocument,
  ReverseDocumentFiscalYear,
  ReverseDocumentTaxRepDate,

  SrcDocNmbrForOriginalDocument,
  SrcDocYearForOriginalDocument,
  SrcDocTypeForOriginalDocument
}