P_RU_JournalEntry

DDL: P_RU_JOURNALENTRY SQL: PRUJOURNALENT Type: view CONSUMPTION

P_RU_JournalEntry is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 17 fields with key fields CompanyCode, AccountingDocument, FiscalYear.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry AccDoc from

Annotations (7)

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

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode
KEY AccountingDocument I_JournalEntry AccountingDocument
KEY FiscalYear I_JournalEntry FiscalYear
PostingDate I_JournalEntry PostingDate
TaxReportingDate I_JournalEntry TaxReportingDate
DocumentDate I_JournalEntry DocumentDate
AccountingDocumentType I_JournalEntry AccountingDocumentType
OriginalReferenceDocument I_JournalEntry OriginalReferenceDocument
ReferenceDocumentType I_JournalEntry ReferenceDocumentType
DocumentReferenceID I_JournalEntry DocumentReferenceID
BusinessTransactionType I_JournalEntry BusinessTransactionType
SenderLogicalSystem I_JournalEntry SenderLogicalSystem
CompanyCodeCurrency I_JournalEntry CompanyCodeCurrency
TransactionCurrency I_JournalEntry TransactionCurrency
AccountingDocumentCategory I_JournalEntry AccountingDocumentCategory
AccountingDocumentCreationDate I_JournalEntry AccountingDocumentCreationDate
CreationTime I_JournalEntry CreationTime
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRUJOURNALENT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RU_JournalEntry
  as select from           I_JournalEntry              as AccDoc

    left outer to one join P_RU_CFinPseudoReversedDoc1 as PseudoReversed on  PseudoReversed.CompanyCode                = AccDoc.CompanyCode
                                                                         and PseudoReversed.OriginalAccountingDocument = AccDoc.AccountingDocument
                                                                         and PseudoReversed.OriginalFiscalYear         = AccDoc.FiscalYear
                                                                         and AccDoc.IsReversal                         = ''
                                                                         and AccDoc.IsReversed                         = ''

{
  key AccDoc.CompanyCode,
  key AccDoc.AccountingDocument,
  key AccDoc.FiscalYear,
      AccDoc.PostingDate,
      AccDoc.TaxReportingDate,
      AccDoc.DocumentDate,
      AccDoc.AccountingDocumentType,

      cast( case when AccDoc.IsReversal = '' and AccDoc.IsReversed = ''
        then case substring( AccDoc.JrnlEntryCntrySpecificRef2, 1, 4)
                  when 'NEG^' then 'X'
                  else ''
             end
        else AccDoc.IsReversal
      end                                                            as fins_xreversing preserving type ) as IsReversal,
      cast( case when PseudoReversed.CompanyCode is not null
        then 'X'
        else AccDoc.IsReversed
      end                                                            as fins_xreversed  preserving type ) as IsReversed,

      case when AccDoc.IsReversal = '' and AccDoc.IsReversed = ''
        then case substring( AccDoc.JrnlEntryCntrySpecificRef2, 1, 4)
                  when 'NEG^' then 'X'
                  else ''
             end
        else ''
      end                                                                                                 as IsPseudoReversal,
      cast( case when PseudoReversed.CompanyCode is not null
        then 'X'
        else ''
      end                                                            as fins_xreversed  preserving type ) as IsPseudoReversed,

      AccDoc.OriginalReferenceDocument,
      AccDoc.ReferenceDocumentType,
      AccDoc.DocumentReferenceID,
      AccDoc.BusinessTransactionType,
      AccDoc.SenderLogicalSystem,
      AccDoc.CompanyCodeCurrency,
      AccDoc.TransactionCurrency,
      AccDoc.AccountingDocumentCategory,
      AccDoc.AccountingDocumentCreationDate,
      AccDoc.CreationTime
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"P_RU_CFINPSEUDOREVERSEDDOC1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/