P_PE_JournalEntryFSStructure2

DDL: P_PE_JOURNALENTRYFSSTRUCTURE2 SQL: PPEJRNLEFSS2 Type: view CONSUMPTION

P_PE_JournalEntryFSStructure2 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_FinancialStatementStructure, I_JournalEntryItem) and exposes 7 fields with key fields CompanyCode, FiscalYear, AccountingDocument, Ledger, FinancialStatementHierarchy.

Data Sources (2)

SourceAliasJoin Type
I_FinancialStatementStructure FinancialStatement from
I_JournalEntryItem JournalEntryItem inner

Parameters (4)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FiscalYear fis_gjahr_no_conv
P_Ledger rldnr
P_FinancialStatementHierarchy hryid

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PPEJRNLEFSS2 view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntryItem CompanyCode
KEY FiscalYear I_JournalEntryItem FiscalYear
KEY AccountingDocument I_JournalEntryItem AccountingDocument
KEY Ledger I_JournalEntryItem Ledger
KEY FinancialStatementHierarchy I_FinancialStatementStructure FinancialStatementHierarchy
KEY GLAccount I_JournalEntryItem GLAccount
AmountInTransactionCurrency
@AbapCatalog.sqlViewName: 'PPEJRNLEFSS2'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED

define view P_PE_JournalEntryFSStructure2
  with parameters
    P_CompanyCode                 : fis_bukrs,
    P_FiscalYear                  : fis_gjahr_no_conv,
    P_Ledger                      : rldnr,
    P_FinancialStatementHierarchy : hryid

  as select from I_FinancialStatementStructure as FinancialStatement

    inner join   I_JournalEntryItem            as JournalEntryItem on  JournalEntryItem.CompanyCode = $parameters.P_CompanyCode
                                                                   and JournalEntryItem.FiscalYear  = $parameters.P_FiscalYear
                                                                   and JournalEntryItem.Ledger      = $parameters.P_Ledger
                                                                   and JournalEntryItem.GLAccount   = FinancialStatement.HierarchyNodeVal

{
  key JournalEntryItem.CompanyCode,
  key JournalEntryItem.FiscalYear,
  key JournalEntryItem.AccountingDocument,
  key JournalEntryItem.Ledger,
  key FinancialStatement.FinancialStatementHierarchy,
  key JournalEntryItem.GLAccount,

      max( JournalEntryItem.AmountInTransactionCurrency ) as AmountInTransactionCurrency

}
where
      FinancialStatement.FinancialStatementNodeType  = 'G'
  and FinancialStatement.FinancialStatementHierarchy = $parameters.P_FinancialStatementHierarchy

group by
  JournalEntryItem.CompanyCode,
  JournalEntryItem.FiscalYear,
  JournalEntryItem.AccountingDocument,
  JournalEntryItem.Ledger,
  FinancialStatement.FinancialStatementHierarchy,
  JournalEntryItem.GLAccount