P_FinStmntHierarchyWithCoCode
P_FinStmntHierarchyWithCoCode is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_CompanyCode, I_FinStmntExpandedHierNode, I_FinStmntExpandedHierNode, I_FinStmntExpandedHierNode, P_GLACCTWITHCOCODE) and exposes 71 fields with key fields FinancialStatementHierarchy, HierarchyVersion, HierarchyNode, ParentNode, ValidityEndDate. It has 4 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | _CompanyCode | inner |
| I_FinStmntExpandedHierNode | Hierarchy | from |
| I_FinStmntExpandedHierNode | Hierarchy | union_all |
| I_FinStmntExpandedHierNode | Hierarchy | union_all |
| P_GLACCTWITHCOCODE | P_GLACCTWITHCOCODE | inner |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | fis_fsv_key_date | |
| P_AlternativeGLAccountIsUsed | char1 | |
| p_FinancialStatementHierarchy | hryid |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_FinancialStatementHierNodeT | _Text | $projection.FinancialStatementHierarchy = _Text.FinancialStatementHierarchy and $projection.HierarchyNode = _Text.HierarchyNode and $projection.ValidityEndDate = _Text.ValidityEndDate and $projection.FinancialStatementLeafItem = '' |
| [0..*] | I_FinancialStatementHierNodeT | _ParentText | $projection.FinancialStatementHierarchy = _ParentText.FinancialStatementHierarchy and $projection.ParentNode = _ParentText.HierarchyNode and $projection.ValidityEndDate = _ParentText.ValidityEndDate |
| [0..1] | I_FinancialStatementLeafItem | _FinancialStatementLeafItem | $projection.FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem |
| [0..1] | I_FinancialStatementHier | _Hierarchy | $projection.FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy and $projection.ValidityEndDate = _Hierarchy.ValidityEndDate |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFSHIERINCCODE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (71)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FinancialStatementHierarchy | FinancialStatementHierarchy | Hierarchy ID | |
| KEY | HierarchyVersion | HierarchyVersion | Version | |
| KEY | HierarchyNode | HierarchyNode | Node | |
| KEY | ParentNode | ParentNode | Parent Node | |
| KEY | ValidityEndDate | ValidityEndDate | ValidTo | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | GLAccount | fsvglacct | GLAccountExternal | G/L Acct External ID |
| ChartOfAccounts | I_FinStmntExpandedHierNode | ChartOfAccounts | Node Class | |
| CountryChartOfAccounts | fsvglacct | CountryChartOfAccounts | Chart of Accts | |
| AlternativeGLAccount | fsvglacct | AlternativeGLAccount | Group Account | |
| FunctionalArea | Value | |||
| NodeType | NodeType | Object Type | ||
| FinStatementHierarchyNodeValue | FinStatementHierarchyNodeValue | Value | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| FinancialStatementItem | FinancialStatementItem | FS Item | ||
| GLAccountInfo | GLAccountInfo | |||
| FunctionalAreaIsUsed | FunctionalAreaIsUsed | |||
| FinancialStatementLeafItem | FinancialStatementLeafItem | Node | ||
| SequenceNumber | SequenceNumber | Sort sequence | ||
| HierarchyLevel | HierarchyLevel | Hierarchy Level | ||
| SignIsInverted | SignIsInverted | |||
| _Text | _Text | |||
| _ParentText | _ParentText | |||
| _FinancialStatementLeafItem | _FinancialStatementLeafItem | |||
| KEY | HierarchyVersion | HierarchyVersion | Version | |
| KEY | HierarchyNode | HierarchyNode | Node | |
| KEY | ParentNode | ParentNode | Parent Node | |
| KEY | ValidityEndDate | ValidityEndDate | ValidTo | |
| KEY | CompanyCode | Receiver Company Code | ||
| KEY | GLAccount | G/L Acct External ID | ||
| ChartOfAccounts | ChartOfAccounts | Node Class | ||
| CountryChartOfAccounts | Chart of Accts | |||
| AlternativeGLAccount | Group Account | |||
| FunctionalArea | Value | |||
| NodeType | NodeType | Object Type | ||
| FinStatementHierarchyNodeValue | FinStatementHierarchyNodeValue | Value | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| FinancialStatementItem | FinancialStatementItem | FS Item | ||
| GLAccountInfo | GLAccountInfo | |||
| FunctionalAreaIsUsed | FunctionalAreaIsUsed | |||
| FinancialStatementLeafItem | FinancialStatementLeafItem | Node | ||
| SequenceNumber | SequenceNumber | Sort sequence | ||
| HierarchyLevel | HierarchyLevel | Hierarchy Level | ||
| SignIsInverted | SignIsInverted | |||
| _Text | _Text | |||
| _ParentText | _ParentText | |||
| _FinancialStatementLeafItem | _FinancialStatementLeafItem | |||
| KEY | HierarchyVersion | HierarchyVersion | Version | |
| KEY | HierarchyNode | HierarchyNode | Node | |
| KEY | ParentNode | ParentNode | Parent Node | |
| KEY | ValidityEndDate | ValidityEndDate | ValidTo | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | GLAccount | G/L Acct External ID | ||
| ChartOfAccounts | I_FinStmntExpandedHierNode | ChartOfAccounts | Node Class | |
| CountryChartOfAccounts | Chart of Accts | |||
| AlternativeGLAccount | Group Account | |||
| FunctionalArea | Value | |||
| NodeType | NodeType | Object Type | ||
| FinStatementHierarchyNodeValue | FinStatementHierarchyNodeValue | Value | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| FinancialStatementItem | FinancialStatementItem | FS Item | ||
| GLAccountInfo | GLAccountInfo | |||
| FunctionalAreaIsUsed | FunctionalAreaIsUsed | |||
| FinancialStatementLeafItem | FinancialStatementLeafItem | Node | ||
| SequenceNumber | SequenceNumber | Sort sequence | ||
| HierarchyLevel | HierarchyLevel | Hierarchy Level | ||
| SignIsInverted | SignIsInverted | |||
| _Text | _Text | |||
| _ParentText | _ParentText | |||
| _FinancialStatementLeafItem | _FinancialStatementLeafItem | |||
| _Hierarchy | _Hierarchy |
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 P_FinStmntHierarchyWithCoCode.
-- 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: PFSHIERINCCODE
-- Parameters: P_KeyDate : fis_fsv_key_date, P_AlternativeGLAccountIsUsed : char1, p_FinancialStatementHierarchy : hryid
CREATE VIEW P_FinStmntHierarchyWithCoCode AS
SELECT
FinancialStatementHierarchy,
HierarchyVersion,
HierarchyNode,
ParentNode,
ValidityEndDate,
CompanyCode,
fsvglacct.GLAccountExternal AS GLAccount,
Hierarchy.ChartOfAccounts AS ChartOfAccounts,
fsvglacct.CountryChartOfAccounts AS CountryChartOfAccounts,
fsvglacct.AlternativeGLAccount AS AlternativeGLAccount,
cast( '' as fkber ) AS FunctionalArea,
NodeType,
FinStatementHierarchyNodeValue,
DebitCreditCode,
FinancialStatementItem,
GLAccountInfo,
FunctionalAreaIsUsed,
FinancialStatementLeafItem,
SequenceNumber,
HierarchyLevel,
SignIsInverted
FROM I_FinStmntExpandedHierNode AS Hierarchy
INNER JOIN P_GLACCTWITHCOCODE ON /* join condition not captured in parsed metadata */
INNER JOIN I_CompanyCode AS _CompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_FinancialStatementHierNodeT AS _Text ON FinancialStatementHierarchy = _Text.FinancialStatementHierarchy AND HierarchyNode = _Text.HierarchyNode AND ValidityEndDate = _Text.ValidityEndDate AND FinancialStatementLeafItem = '' -- association [0..*]
LEFT OUTER JOIN I_FinancialStatementHierNodeT AS _ParentText ON FinancialStatementHierarchy = _ParentText.FinancialStatementHierarchy AND ParentNode = _ParentText.HierarchyNode AND ValidityEndDate = _ParentText.ValidityEndDate -- association [0..*]
LEFT OUTER JOIN I_FinancialStatementLeafItem AS _FinancialStatementLeafItem ON FinancialStatementLeafItem = _FinancialStatementLeafItem.FinancialStatementLeafItem -- association [0..1]
LEFT OUTER JOIN I_FinancialStatementHier AS _Hierarchy ON FinancialStatementHierarchy = _Hierarchy.FinancialStatementHierarchy AND ValidityEndDate = _Hierarchy.ValidityEndDate -- association [0..1]
-- UNION ALL with additional select branch(es): I_FinStmntExpandedHierNode
;
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