I_FinancialStatementBalCube

DDL: I_FINANCIALSTATEMENTBALCUBE SQL: IFISTMNTBALCUBE Type: view COMPOSITE

Financial Statement Balance

I_FinancialStatementBalCube is a Composite CDS View (Cube) that provides data about "Financial Statement Balance" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItem) and exposes 65 fields with key fields Ledger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 9 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_GLAccountLineItem I_GLAccountLineItem from

Parameters (20)

NameTypeDefault
P_FinancialStatementVersion hryid
P_FromFiscalPeriod fins_fiscalperiod
P_ToFiscalPeriod fins_fiscalperiod
P_FiscalYear fis_gjahr
P_FromComparisonFiscalPeriod fis_period_from_cmp
P_ToComparisonFiscalPeriod fis_period_to_cmp
P_ComparisonFiscalYear fis_gjahr_cmp
P_FromComparisonFiscalPeriod2 finstmnt_period_from_cmp2
P_ToComparisonFiscalPeriod2 finstmnt_period_to_cmp2
P_ComparisonFiscalYear2 finstmnt_gjahr_cmp2
P_Ledger fins_ledger
P_CurrencyRole fins_curtype
P_BalanceSheetType finstmnt_statement_type
P_KeyDate fis_fsv_key_date
P_FromPostingDate fis_budat
P_ToPostingDate fis_budat
P_ComprnFromPostingDate fis_budat
P_ComprnToPostingDate fis_budat
P_ComparisonFromPostingDate2 fis_budat
P_ComparisonToPostingDate2 fis_budat

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_FinancialStatementLeafItem _FinancialStatementLeafItem $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem
[1..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[0..1] I_ChartOfAccounts _CorpGroupChartOfAccounts $projection.corporategroupchartofaccounts = _CorpGroupChartOfAccounts.ChartOfAccounts
[0..1] I_GLAccountInChartOfAccounts _CorporateGroupAccount $projection.corporategroupchartofaccounts = _CorporateGroupAccount.ChartOfAccounts and $projection.CorporateGroupAccount = _CorporateGroupAccount.GLAccount
[0..1] I_AlternativeGLAccountIsUsed _AlternativeGLAccountIsUsed $projection.AlternativeGLAccountIsUsed = _AlternativeGLAccountIsUsed.AlternativeGLAccountIsUsed
[0..1] I_Indicator _ZeroBalanceAccountIsDisplayed $projection.ZeroBalanceAccountIsDisplayed = _ZeroBalanceAccountIsDisplayed.IndicatorValue
[0..1] I_WBSElement _WBSElement $projection.WBSElement = _WBSElement.WBSElement
[0..1] I_AccountingDocumentType _AccountingDocumentType $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
[0..1] I_FinancialTransactionType _FinancialTransactionType $projection.FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName IFISTMNTBALCUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
Analytics.dataExtraction.enabled false view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ObjectModel.representativeKey LedgerGLLineItem view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
AbapCatalog.buffering.status #NOT_ALLOWED view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
EndUserText.label Financial Statement Balance view
Analytics.readClassName CL_FINSTMNT_CDS_READ_GEN view

Fields (65)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger
_Ledger _Ledger
KEY CompanyCode CompanyCode
_CompanyCode _CompanyCode
KEY FiscalYear FiscalYear
_FiscalYear _FiscalYear
KEY AccountingDocument AccountingDocument
_JournalEntry _JournalEntry
KEY LedgerGLLineItem LedgerGLLineItem
LedgerFiscalYear LedgerFiscalYear
_LedgerFiscalYear _LedgerFiscalYear
ControllingArea ControllingArea
_ControllingArea _ControllingArea
ChartOfAccounts ChartOfAccounts
_ChartOfAccounts _ChartOfAccounts
GLAccount GLAccount
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
FinancialStatementLeafItem Financial Statement Leaf Item
_FinancialStatementLeafItem _FinancialStatementLeafItem
NodeCategory
SignIsInverted
CostCenter CostCenter
_CostCenter _CostCenter
ProfitCenter ProfitCenter
_ProfitCenter _ProfitCenter
FunctionalArea FunctionalArea
_FunctionalArea _FunctionalArea
BusinessArea BusinessArea
_BusinessArea _BusinessArea
FiscalPeriod FiscalPeriod
_FiscalPeriod _FiscalPeriod
FiscalYearVariant FiscalYearVariant
_FiscalYearVariant _FiscalYearVariant
AlternativeGLAccount AlternativeGLAccount
_AlternativeGLAccount _AlternativeGLAccount
CountryChartOfAccounts CountryChartOfAccounts
_CountryChartOfAccounts _CountryChartOfAccounts
Segment Segment
_Segment _Segment
WBSElement
_WBSElement _WBSElement
CorporateGroupAccount _GLAccountInChartOfAccounts CorporateGroupAccount
_CorporateGroupAccount _CorporateGroupAccount
CorporateGroupChartOfAccounts _ChartOfAccounts CorporateGroupChartOfAccounts
_CorpGroupChartOfAccounts _CorpGroupChartOfAccounts
AccountingDocumentType AccountingDocumentType
_AccountingDocumentType _AccountingDocumentType
FinancialTransactionType FinancialTransactionType
_FinancialTransactionType _FinancialTransactionType
AlternativeGLAccountIsUsed
_AlternativeGLAccountIsUsed _AlternativeGLAccountIsUsed
FinStmntAlternativeAcctSource
ReportingPeriod
ZeroBalanceAccountIsDisplayed
_ZeroBalanceAccountIsDisplayed _ZeroBalanceAccountIsDisplayed
ExtensibilityScenarioID
Currency
_Currency _Currency
PeriodBalanceAmount
PeriodBalAmtInDspCrcy
DebitAmtInDisplayCrcy
CreditAmtInDisplayCrcy
YearlyBalAmtInDspCrcy
StartingBalAmtInDspCrcy
EndingBalAmtInDspCrcy
@AbapCatalog.sqlViewName: 'IFISTMNTBALCUBE'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@Analytics: { dataCategory: #CUBE, dataExtraction.enabled: false }
//@Analytics: { dataCategory: #CUBE }

@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking:#BLOCKED_DATA_INCLUDED
@ObjectModel.representativeKey: 'LedgerGLLineItem'
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions:true
@EndUserText.label: 'Financial Statement Balance'
@Analytics.readClassName: 'CL_FINSTMNT_CDS_READ_GEN'

define view I_FinancialStatementBalCube
  with parameters
    P_FinancialStatementVersion  : hryid,
    P_FromFiscalPeriod           : fins_fiscalperiod,
    P_ToFiscalPeriod             : fins_fiscalperiod,
    P_FiscalYear                 : fis_gjahr,
    P_FromComparisonFiscalPeriod : fis_period_from_cmp,
    P_ToComparisonFiscalPeriod   : fis_period_to_cmp,
    P_ComparisonFiscalYear       : fis_gjahr_cmp,
    P_FromComparisonFiscalPeriod2 : finstmnt_period_from_cmp2,
    P_ToComparisonFiscalPeriod2   : finstmnt_period_to_cmp2,
    P_ComparisonFiscalYear2       : finstmnt_gjahr_cmp2,
    P_Ledger                     : fins_ledger,
    P_CurrencyRole               : fins_curtype,
    P_BalanceSheetType           : finstmnt_statement_type,
    P_KeyDate                    : fis_fsv_key_date,
    P_FromPostingDate             : fis_budat,
    P_ToPostingDate               : fis_budat,
    P_ComprnFromPostingDate       : fis_budat,
    P_ComprnToPostingDate         : fis_budat,
    P_ComparisonFromPostingDate2  : fis_budat,
    P_ComparisonToPostingDate2    : fis_budat
  as select from I_GLAccountLineItem as I_GLAccountLineItem

//  association [1..1] to E_JournalEntryItem            as _Extension                    on  $projection.sourceledger       = _Extension.SourceLedger

//                                                                                       and $projection.CompanyCode        = _Extension.CompanyCode

//                                                                                       and $projection.FiscalYear         = _Extension.FiscalYear

//                                                                                       and $projection.AccountingDocument = _Extension.AccountingDocument

//                                                                                       and $projection.LedgerGLLineItem   = _Extension.LedgerGLLineItem


  association [0..1] to I_FinancialStatementLeafItem  as _FinancialStatementLeafItem   on  $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem

  association [1..1] to I_Currency                    as _Currency                     on  $projection.Currency = _Currency.Currency

  association [0..1] to I_ChartOfAccounts             as _CorpGroupChartOfAccounts     on  $projection.corporategroupchartofaccounts = _CorpGroupChartOfAccounts.ChartOfAccounts
  association [0..1] to I_GLAccountInChartOfAccounts  as _CorporateGroupAccount        on  $projection.corporategroupchartofaccounts = _CorporateGroupAccount.ChartOfAccounts
                                                                                       and $projection.CorporateGroupAccount         = _CorporateGroupAccount.GLAccount
  association [0..1] to I_AlternativeGLAccountIsUsed  as _AlternativeGLAccountIsUsed   on  $projection.AlternativeGLAccountIsUsed    = _AlternativeGLAccountIsUsed.AlternativeGLAccountIsUsed
  association [0..1] to I_Indicator                   as _ZeroBalanceAccountIsDisplayed on  $projection.ZeroBalanceAccountIsDisplayed = _ZeroBalanceAccountIsDisplayed.IndicatorValue
  association [0..1]  to I_WBSElement                 as _WBSElement                    on  $projection.WBSElement = _WBSElement.WBSElement                                      /*do not use any longer*/
  association [0..1] to I_AccountingDocumentType       as _AccountingDocumentType        on  $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
  association [0..1] to I_FinancialTransactionType     as _FinancialTransactionType      on  $projection.FinancialTransactionType = _FinancialTransactionType.FinancialTransactionType
{


      @ObjectModel.foreignKey.association: '_Ledger'
  key Ledger,
      _Ledger,
      @ObjectModel.foreignKey.association: '_CompanyCode'
  key CompanyCode,
      _CompanyCode,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key FiscalYear,
      _FiscalYear,
      @ObjectModel.foreignKey.association: '_JournalEntry'
  key AccountingDocument,
      _JournalEntry,
  key LedgerGLLineItem,
      @ObjectModel.foreignKey.association: '_LedgerFiscalYear'
      @Semantics.fiscal.year: true
      LedgerFiscalYear,
      _LedgerFiscalYear,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,
      _ControllingArea,
      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      ChartOfAccounts,
      _ChartOfAccounts,

      @ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
      GLAccount,
      _GLAccountInChartOfAccounts,
      @ObjectModel.foreignKey.association:'_FinancialStatementLeafItem'
      @EndUserText.label: 'Financial Statement Leaf Item'
      //cast('' as fins_fsleaf) as FinancialStatementLeafItem,

      cast('' as hrynode ) as FinancialStatementLeafItem,
      _FinancialStatementLeafItem,
      cast( ' ' as nodecategory ) as NodeCategory,
      cast( ' ' as rr_rsign ) as SignIsInverted,
      @ObjectModel.foreignKey.association: '_CostCenter'
      CostCenter,
      _CostCenter,
      @ObjectModel.foreignKey.association: '_ProfitCenter'
      ProfitCenter,
      _ProfitCenter,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      FunctionalArea,
      _FunctionalArea,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,
      _BusinessArea,
      @ObjectModel.foreignKey.association: '_FiscalPeriod'
      @Semantics.fiscal.period: true
      FiscalPeriod,
      _FiscalPeriod,
      @ObjectModel.foreignKey.association: '_FiscalYearVariant'
      @Semantics.fiscal.yearVariant: true
      FiscalYearVariant,
      _FiscalYearVariant,

      @ObjectModel.foreignKey.association: '_AlternativeGLAccount'
      AlternativeGLAccount,
      _AlternativeGLAccount,
      @ObjectModel.foreignKey.association: '_CountryChartOfAccounts'
      CountryChartOfAccounts,
      _CountryChartOfAccounts,
      @ObjectModel.foreignKey.association: '_Segment'
      Segment,
      _Segment,
      @ObjectModel.foreignKey.association: '_WBSElement'
      //WBSElement,

      //cast( WBSElement as fis_wbs_no_conv preserving type ) as WBSElement,

      cast( WBSElement as ps_posid preserving type ) as WBSElement,
      _WBSElement,
      @ObjectModel.foreignKey.association: '_CorporateGroupAccount'
      _GLAccountInChartOfAccounts.CorporateGroupAccount as CorporateGroupAccount,
      _CorporateGroupAccount,
      @ObjectModel.foreignKey.association: '_CorpGroupChartOfAccounts'
      _ChartOfAccounts.CorporateGroupChartOfAccounts,
      _CorpGroupChartOfAccounts,

      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
      AccountingDocumentType,
      _AccountingDocumentType,
      @ObjectModel.foreignKey.association: '_FinancialTransactionType'
      FinancialTransactionType,
      _FinancialTransactionType,

      @ObjectModel.foreignKey.association: '_AlternativeGLAccountIsUsed'
      cast (' ' as fis_disalteracct) as AlternativeGLAccountIsUsed,
      _AlternativeGLAccountIsUsed,

      @Consumption.filter: { selectionType: #SINGLE, multipleSelections: false, mandatory: false }
      cast (' ' as finstmnt_altkt_source) as FinStmntAlternativeAcctSource,

      cast(' ' as finstmnt_report_period) as ReportingPeriod,

       @ObjectModel.foreignKey.association: '_ZeroBalanceAccountIsDisplayed'
      cast( ' ' as fis_zerobalance)    as ZeroBalanceAccountIsDisplayed,
      _ZeroBalanceAccountIsDisplayed,


      cast( ' ' as vch_scenario_id)    as ExtensibilityScenarioID,

      ///////////////////////////////////////////////////////////////////////////////

      // Currency and Amount Fields

      ///////////////////////////////////////////////////////////////////////////////

      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_Currency'
      cast (CompanyCodeCurrency as fis_waers)     as Currency,
      _Currency,

       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_bal_amt ) as PeriodBalanceAmount,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_period_bal_amt ) as PeriodBalAmtInDspCrcy,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_period_debit_amt ) as DebitAmtInDisplayCrcy,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_period_credit_amt ) as CreditAmtInDisplayCrcy,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_year_open_amt ) as YearlyBalAmtInDspCrcy,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_period_open_amt ) as StartingBalAmtInDspCrcy,
       @DefaultAggregation: #SUM
       @Semantics: { amount : {currencyCode: 'Currency'} }
       cast( 1 as finstmnt_period_end_amt ) as EndingBalAmtInDspCrcy

      //_Extension  Extensions must be local


}
///////////////////////////////////////////////////////////////////////////////

// This is a virtual cube and serves only as metadata for the OLAP Engine.

// A SQL request shall never return any data.

where
  Ledger = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHARTOFACCOUNTS",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCOUNTLINEITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_ALTERNATIVEGLACCOUNTISUSED",
"I_BUSINESSAREA",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_CURRENCY",
"I_FINANCIALSTATEMENTLEAFITEM",
"I_FINANCIALTRANSACTIONTYPE",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_FISCALYEARVARIANT",
"I_FUNCTIONALAREA",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_INDICATOR",
"I_JOURNALENTRY",
"I_LEDGER",
"I_PROFITCENTER",
"I_SEGMENT",
"I_WBSELEMENT"
],
"BASE":
[
"I_GLACCOUNTLINEITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/