I_FinancialStatementAccountBal
Financial Statement G/L Account Balance
I_FinancialStatementAccountBal is a Composite CDS View that provides data about "Financial Statement G/L Account Balance" in SAP S/4HANA. It reads from 2 data sources (P_FinStmntHierarchyWithCoCode, P_GLAcctBalWithComprnPeriod) and exposes 61 fields with key fields FinancialStatementHierarchy, HierarchyVersion, HierarchyNode, ParentNode, ValidityEndDate. It has 20 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_FinStmntHierarchyWithCoCode | P_FinStmntHierarchyWithCoCode | from |
| P_GLAcctBalWithComprnPeriod | P_GLAcctBalWithComprnPeriod | left_outer |
Parameters (12)
| Name | Type | Default |
|---|---|---|
| P_FinancialStatementHierarchy | hryid | |
| P_Language | sylangu | |
| P_Ledger | fis_rldnr | |
| P_FromPostingDate | fis_budat | |
| P_ToPostingDate | fis_budat | |
| P_ComprnFromPostingDate | fis_budat | |
| P_ComprnToPostingDate | fis_budat | |
| P_ComparisonFromPostingDate2 | fis_budat | |
| P_ComparisonToPostingDate2 | fis_budat | |
| P_CurrencyRole | fis_curtp | |
| P_KeyDate | fis_fsv_key_date | |
| P_AlternativeGLAccountIsUsed | char1 |
Associations (20)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_FinancialStatementHier | _Hierarchy | $projection.FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate |
| [0..1] | I_FinStmntExpandedHierNode | _FinStmntHierNode | $projection.FinancialStatementHierarchy = _FinStmntHierNode.FinancialStatementHierarchy and $projection.HierarchyVersion = _FinStmntHierNode.HierarchyVersion and $projection.HierarchyNode = _FinStmntHierNode.HierarchyNode and $projection.ParentNode = _FinStmntHierNode.ParentNode and $projection.ValidityEndDate = _FinStmntHierNode.ValidityEndDate |
| [0..*] | I_FinStmntExpandedHierNode | _FinStmntHierParentNode | $projection.FinancialStatementHierarchy = _FinStmntHierParentNode.FinancialStatementHierarchy and $projection.HierarchyVersion = _FinStmntHierParentNode.HierarchyVersion and $projection.ParentNode = _FinStmntHierParentNode.HierarchyNode and $projection.ValidityEndDate = _FinStmntHierParentNode.ValidityEndDate |
| [0..1] | I_FinancialStatementLeafItem | _FinancialStatementLeafItem | $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem |
| [1..1] | I_JournalEntry | _JournalEntry | $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.FiscalYear = _JournalEntry.FiscalYear and $projection.AccountingDocument = _JournalEntry.AccountingDocument |
| [1..1] | I_Ledger | _Ledger | $projection.Ledger = _Ledger.Ledger |
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_FiscalYearForCompanyCode | _FiscalYear | $projection.FiscalYear = _FiscalYear.FiscalYear and $projection.CompanyCode = _FiscalYear.CompanyCode |
| [0..1] | I_FiscalYearForCompanyCode | _LedgerFiscalYear | $projection.LedgerFiscalYear = _LedgerFiscalYear.FiscalYear and $projection.CompanyCode = _LedgerFiscalYear.CompanyCode |
| [0..1] | I_ChartOfAccounts | _ChartOfAccounts | $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts |
| [0..1] | I_GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts and $projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount |
| [0..1] | I_AccountingDocumentType | _AccountingDocumentType | $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType |
| [0..1] | I_GLAccountInCompanyCode | _GLAccountInCompanyCode | $projection.CompanyCode = _GLAccountInCompanyCode.CompanyCode and $projection.GLAccount = _GLAccountInCompanyCode.GLAccount |
| [0..1] | I_GLAccountInChartOfAccounts | _GLAccountExternal | $projection.ChartOfAccounts = _GLAccountExternal.ChartOfAccounts and $projection.GLAccountExternal = _GLAccountExternal.GLAccount |
| [0..1] | I_ControllingArea | _ControllingArea | $projection.ControllingArea = _ControllingArea.ControllingArea |
| [0..1] | I_Segment | _Segment | $projection.Segment = _Segment.Segment |
| [0..*] | I_ProfitCenter | _ProfitCenter | $projection.ControllingArea = _ProfitCenter.ControllingArea and $projection.ProfitCenter = _ProfitCenter.ProfitCenter |
| [0..*] | I_CostCenter | _CostCenter | $projection.ControllingArea = _CostCenter.ControllingArea and $projection.CostCenter = _CostCenter.CostCenter |
| [0..1] | I_BusinessArea | _BusinessArea | $projection.BusinessArea = _BusinessArea.BusinessArea |
| [0..1] | I_FunctionalArea | _FunctionalArea | $projection.FunctionalArea = _FunctionalArea.FunctionalArea |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IFINSTMNTACCTBAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| EndUserText.label | Financial Statement G/L Account Balance | view |
Fields (61)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FinancialStatementHierarchy | Hierarchy | FinancialStatementHierarchy | Hierarchy ID |
| KEY | HierarchyVersion | Hierarchy | HierarchyVersion | Version |
| KEY | HierarchyNode | Hierarchy | HierarchyNode | Node |
| KEY | ParentNode | Hierarchy | ParentNode | Parent Node |
| KEY | ValidityEndDate | Hierarchy | ValidityEndDate | ValidTo |
| KEY | Ledger | GLbalance | Ledger | Ledger |
| KEY | CompanyCode | Hierarchy | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | GLbalance | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | GLbalance | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | GLbalance | LedgerGLLineItem | Journal Entry Item |
| SequenceNumber | SequenceNumber | Sort sequence | ||
| HierarchyLevel | HierarchyLevel | Hierarchy Level | ||
| SignIsInverted | SignIsInverted | |||
| HierarchyNodeText | ||||
| FinancialStatementLeafItem | Hierarchy | FinancialStatementLeafItem | Node | |
| NodeType | Hierarchy | NodeType | Object Type | |
| FinStatementHierarchyNodeValue | Hierarchy | FinStatementHierarchyNodeValue | Value | |
| FunctionalAreaIsUsed | Hierarchy | FunctionalAreaIsUsed | ||
| DebitCreditCode | Hierarchy | DebitCreditCode | Single-Character Flag | |
| ChartOfAccountsendasChartOfAccounts | ||||
| FinancialStatementItem | Hierarchy | FinancialStatementItem | FS Item | |
| GLAccountendasGLAccount | ||||
| AlternativeGLAccount | Hierarchy | AlternativeGLAccount | Group Account | |
| GLAccountExternal | GLbalance | GLAccountExternal | G/L Acct External ID | |
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| GLAccountType | GLAccountType | G/L Account Type | ||
| LedgerFiscalYear | LedgerFiscalYear | |||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostCenter | CostCenter | Cost Center | ||
| ProfitCenter | ProfitCenter | Profit Center | ||
| FunctionalArea | GLbalance | FunctionalArea | Sendr Fctl Area | |
| BusinessArea | BusinessArea | Business Area | ||
| Segment | Segment | Segment number | ||
| ReportingPeriod | ReportingPeriod | Single-Character Flag | ||
| Currency | Currency | Valuation Crcy | ||
| PeriodBalAmtInDspCrcy | PeriodBalAmtInDspCrcy | |||
| DebitAmtInDisplayCrcy | DebitPeriodBalAmtInDspCrcy | |||
| CreditAmtInDisplayCrcy | CreditPeriodBalAmtInDspCrcy | |||
| YearlyBalAmtInDspCrcy | YearOpeningBalAmtInDspCrcy | |||
| StartingBalAmtInDspCrcy | OpeningPeriodBalAmtInDspCrcy | |||
| EndingBalAmtInDspCrcy | EndingPeriodBalAmtInDspCrcy | |||
| _Hierarchy | _Hierarchy | |||
| _FinStmntHierNode | _FinStmntHierNode | |||
| _FinStmntHierParentNode | _FinStmntHierParentNode | |||
| _FinancialStatementLeafItem | _FinancialStatementLeafItem | |||
| _JournalEntry | _JournalEntry | |||
| _Ledger | _Ledger | |||
| _CompanyCode | _CompanyCode | |||
| _FiscalYear | _FiscalYear | |||
| _LedgerFiscalYear | _LedgerFiscalYear | |||
| _ChartOfAccounts | _ChartOfAccounts | |||
| _AccountingDocumentType | _AccountingDocumentType | |||
| _GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | |||
| _GLAccountInCompanyCode | _GLAccountInCompanyCode | |||
| _GLAccountExternal | _GLAccountExternal | |||
| _ControllingArea | _ControllingArea | |||
| _Segment | _Segment | |||
| _ProfitCenter | _ProfitCenter | |||
| _CostCenter | _CostCenter | |||
| _BusinessArea | _BusinessArea | |||
| _FunctionalArea | _FunctionalArea |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_FinancialStatementAccountBal.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IFINSTMNTACCTBAL
-- Parameters: P_FinancialStatementHierarchy : hryid, P_Language : sylangu, P_Ledger : fis_rldnr, P_FromPostingDate : fis_budat, P_ToPostingDate : fis_budat, P_ComprnFromPostingDate : fis_budat, P_ComprnToPostingDate : fis_budat, P_ComparisonFromPostingDate2 : fis_budat, P_ComparisonToPostingDate2 : fis_budat, P_CurrencyRole : fis_curtp, P_KeyDate : fis_fsv_key_date, P_AlternativeGLAccountIsUsed : char1
CREATE VIEW I_FinancialStatementAccountBal AS
SELECT
Hierarchy.FinancialStatementHierarchy AS FinancialStatementHierarchy,
Hierarchy.HierarchyVersion AS HierarchyVersion,
Hierarchy.HierarchyNode AS HierarchyNode,
Hierarchy.ParentNode AS ParentNode,
Hierarchy.ValidityEndDate AS ValidityEndDate,
GLbalance.Ledger AS Ledger,
Hierarchy.CompanyCode AS CompanyCode,
GLbalance.FiscalYear AS FiscalYear,
GLbalance.AccountingDocument AS AccountingDocument,
GLbalance.LedgerGLLineItem AS LedgerGLLineItem,
SequenceNumber,
HierarchyLevel,
SignIsInverted,
Hierarchy._Text[1:Language = $parameters.P_Language].HierarchyNodeText AS HierarchyNodeText,
Hierarchy.FinancialStatementLeafItem AS FinancialStatementLeafItem,
Hierarchy.NodeType AS NodeType,
Hierarchy.FinStatementHierarchyNodeValue AS FinStatementHierarchyNodeValue,
Hierarchy.FunctionalAreaIsUsed AS FunctionalAreaIsUsed,
Hierarchy.DebitCreditCode AS DebitCreditCode,
case when Hierarchy.FunctionalAreaIsUsed = 'F' then GLbalance.ChartOfAccounts else Hierarchy.ChartOfAccounts end as ChartOfAccounts AS ChartOfAccountsendasChartOfAccounts,
Hierarchy.FinancialStatementItem AS FinancialStatementItem,
case when Hierarchy.FunctionalAreaIsUsed = 'F' then GLbalance.GLAccountExternal else Hierarchy.GLAccount end as GLAccount AS GLAccountendasGLAccount,
Hierarchy.AlternativeGLAccount AS AlternativeGLAccount,
GLbalance.GLAccountExternal AS GLAccountExternal,
AccountingDocumentType,
GLAccountType,
LedgerFiscalYear,
ControllingArea,
CostCenter,
ProfitCenter,
GLbalance.FunctionalArea AS FunctionalArea,
BusinessArea,
Segment,
ReportingPeriod,
Currency,
PeriodBalAmtInDspCrcy,
DebitPeriodBalAmtInDspCrcy AS DebitAmtInDisplayCrcy,
CreditPeriodBalAmtInDspCrcy AS CreditAmtInDisplayCrcy,
YearOpeningBalAmtInDspCrcy AS YearlyBalAmtInDspCrcy,
OpeningPeriodBalAmtInDspCrcy AS StartingBalAmtInDspCrcy,
EndingPeriodBalAmtInDspCrcy AS EndingBalAmtInDspCrcy
FROM P_FinStmntHierarchyWithCoCode
LEFT OUTER JOIN P_GLAcctBalWithComprnPeriod ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_FinancialStatementHier AS _Hierarchy ON FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy AND ValidityEndDate = _Hierarchy.ValidityEndDate -- association [0..1]
LEFT OUTER JOIN I_FinStmntExpandedHierNode AS _FinStmntHierNode ON FinancialStatementHierarchy = _FinStmntHierNode.FinancialStatementHierarchy AND HierarchyVersion = _FinStmntHierNode.HierarchyVersion AND HierarchyNode = _FinStmntHierNode.HierarchyNode AND ParentNode = _FinStmntHierNode.ParentNode AND ValidityEndDate = _FinStmntHierNode.ValidityEndDate -- association [0..1]
LEFT OUTER JOIN I_FinStmntExpandedHierNode AS _FinStmntHierParentNode ON FinancialStatementHierarchy = _FinStmntHierParentNode.FinancialStatementHierarchy AND HierarchyVersion = _FinStmntHierParentNode.HierarchyVersion AND ParentNode = _FinStmntHierParentNode.HierarchyNode AND ValidityEndDate = _FinStmntHierParentNode.ValidityEndDate -- association [0..*]
LEFT OUTER JOIN I_FinancialStatementLeafItem AS _FinancialStatementLeafItem ON FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _JournalEntry ON CompanyCode = _JournalEntry.CompanyCode AND FiscalYear = _JournalEntry.FiscalYear AND AccountingDocument = _JournalEntry.AccountingDocument -- association [1..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _FiscalYear ON FiscalYear = _FiscalYear.FiscalYear AND CompanyCode = _FiscalYear.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_FiscalYearForCompanyCode AS _LedgerFiscalYear ON LedgerFiscalYear = _LedgerFiscalYear.FiscalYear AND CompanyCode = _LedgerFiscalYear.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_ChartOfAccounts AS _ChartOfAccounts ON ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountInChartOfAccounts ON ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts AND GLAccount = _GLAccountInChartOfAccounts.GLAccount -- association [0..1]
LEFT OUTER JOIN I_AccountingDocumentType AS _AccountingDocumentType ON AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType -- association [0..1]
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON CompanyCode = _GLAccountInCompanyCode.CompanyCode AND GLAccount = _GLAccountInCompanyCode.GLAccount -- association [0..1]
LEFT OUTER JOIN I_GLAccountInChartOfAccounts AS _GLAccountExternal ON ChartOfAccounts = _GLAccountExternal.ChartOfAccounts AND GLAccountExternal = _GLAccountExternal.GLAccount -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea -- association [0..1]
LEFT OUTER JOIN I_Segment AS _Segment ON Segment = _Segment.Segment -- association [0..1]
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON ControllingArea = _ProfitCenter.ControllingArea AND ProfitCenter = _ProfitCenter.ProfitCenter -- association [0..*]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON ControllingArea = _CostCenter.ControllingArea AND CostCenter = _CostCenter.CostCenter -- association [0..*]
LEFT OUTER JOIN I_BusinessArea AS _BusinessArea ON BusinessArea = _BusinessArea.BusinessArea -- association [0..1]
LEFT OUTER JOIN I_FunctionalArea AS _FunctionalArea ON FunctionalArea = _FunctionalArea.FunctionalArea -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA