P_FinStmtLeafWithGLAcct
P_FinStmtLeafWithGLAcct is a Basic CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 22 fields with key fields HierarchyUniqueNodeID, UniqueParentID, versn, ktopl, saknr.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_FinancialStatementItem | fsitem | left_outer |
| I_FinancialStatementItem | fsitem | left_outer |
| I_GLAccountInChartOfAccounts | GLAccount | from |
| t011 | t011 | inner |
| fagl_011zc | zc_leaf | left_outer |
| P_FAGL_011ZC | zc_range | union_all |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | PFSLEAFGLACC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AbapCatalog.preserveKey | true | view |
Fields (22)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | HierarchyUniqueNodeID | |||
| KEY | UniqueParentID | |||
| KEY | versn | t011 | versn | Version |
| KEY | ktopl | I_GLAccountInChartOfAccounts | ChartOfAccounts | G/L Chart of Accounts |
| KEY | saknr | I_GLAccountInChartOfAccounts | GLAccount | General Ledger |
| type | ||||
| Description | ||||
| xsoll | fagl_011zc | xsoll | Debit Balance | |
| xhabn | fagl_011zc | xhabn | Credit Balance | |
| stufe | ||||
| char50asHierarchyUniqueNodeID | ||||
| KEY | UniqueParentID | |||
| KEY | versn | P_FAGL_011ZC | versn | Version |
| KEY | ergsl | P_FAGL_011ZC | ergsl | FS Item |
| KEY | ktopl | P_FAGL_011ZC | ktopl | G/L Chart of Accounts |
| saknr | General Ledger | |||
| type | ||||
| Description | ||||
| xsoll | Debit Balance | |||
| xhabn | Credit Balance | |||
| stufe | ||||
| id | I_FinancialStatementItem | HierarchyNode | Node |
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_FinStmtLeafWithGLAcct.
-- 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: PFSLEAFGLACC
CREATE VIEW P_FinStmtLeafWithGLAcct AS
SELECT
cast ( concat(concat(concat( fsitem.HierarchyNode,GLAccount.ChartOfAccounts),GLAccount.GLAccount),'=') as abap.char(50) ) AS HierarchyUniqueNodeID,
cast (concat(concat( concat(concat( fsitem.HierarchyNode,zc_leaf.ktopl),zc_leaf.vonkt ),'-'),zc_leaf.biskt ) as abap.char(50) ) AS UniqueParentID,
t011.versn AS versn,
GLAccount.ChartOfAccounts AS ktopl,
GLAccount.GLAccount AS saknr,
cast ('L' as seu_type) AS type,
cast ( '' as abap.char( 50 )) AS Description,
zc_leaf.xsoll AS xsoll,
zc_leaf.xhabn AS xhabn,
cast (fsitem.FinStatementHierarchyLevelVal as abap.int4) + 2 AS stufe,
fsitem.HierarchyNode as id AS char50asHierarchyUniqueNodeID,
zc_range.ergsl AS ergsl,
fsitem.HierarchyNode AS id
FROM I_GLAccountInChartOfAccounts AS GLAccount
INNER JOIN t011 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN fagl_011zc AS zc_leaf ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_FinancialStatementItem AS fsitem ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_FAGL_011ZC
;
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