P_RU_CommissionTradeInvoice10

DDL: P_RU_COMMISSIONTRADEINVOICE10 Type: view_entity CONSUMPTION Package: GLO_FIN_IS_VAT_RU

Comission Trade Invoices - Alternative 0

P_RU_CommissionTradeInvoice10 is a Consumption CDS View that provides data about "Comission Trade Invoices - Alternative 0" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, P_RU_ReversedDocument) and exposes 20 fields. Part of development package GLO_FIN_IS_VAT_RU.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from
P_RU_ReversedDocument P_RU_ReversedDocument union_all

Annotations (4)

NameValueLevelField
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view

Fields (20)

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
AccountingDocument AccountingDocument
FiscalYear FiscalYear
AccountingDocumentType AccountingDocumentType
PostingDate PostingDate
TaxReportingDate TaxReportingDate
IsReversal IsReversal
IsReversed IsReversed
ReverseDocument ReverseDocument
ReverseDocumentFiscalYear ReverseDocumentFiscalYear
ReverseDocumentTaxRepDate ReverseDocumentTaxRepDate
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
define view entity P_RU_CommissionTradeInvoice10
  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

}
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_ReversedDocument

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

  IsReversal,
  IsReversed,
  ReverseDocument,
  ReverseDocumentFiscalYear,
  ReverseDocumentTaxRepDate
}