P_FinStmtHierarchyWithCocd
P_FinStmtHierarchyWithCocd is a Basic CDS View in SAP S/4HANA. It reads from 3 data sources (I_GLAccountInCompanyCode, I_CompanyCode, P_FinStmtHierarchy) and exposes 19 fields with key fields HierarchyUniqueNodeID, UniqueParentID, versn, ergsl, ktopl.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountInCompanyCode | _GLAccountInCompanyCode | left_outer |
| I_CompanyCode | I_CompanyCode | inner |
| P_FinStmtHierarchy | P_FinStmtHierarchy | from |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | PFSITEMHIERCOCD | view | |
| ClientDependent | true | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | HierarchyUniqueNodeID | P_FinStmtHierarchy | HierarchyUniqueNodeID | |
| KEY | UniqueParentID | P_FinStmtHierarchy | UniqueParentID | |
| KEY | versn | P_FinStmtHierarchy | versn | |
| KEY | ergsl | P_FinStmtHierarchy | ergsl | |
| KEY | ktopl | P_FinStmtHierarchy | ktopl | |
| KEY | bukrs | I_CompanyCode | CompanyCode | |
| KEY | saknr | P_FinStmtHierarchy | saknr | |
| KEY | fkber | P_FinStmtHierarchy | fkber | |
| type | P_FinStmtHierarchy | type | ||
| Description | P_FinStmtHierarchy | Description | ||
| MaintenanceLanguage | P_FinStmtHierarchy | MaintenanceLanguage | ||
| id | P_FinStmtHierarchy | id | ||
| parent | P_FinStmtHierarchy | parent | ||
| child | P_FinStmtHierarchy | child | ||
| nextn | P_FinStmtHierarchy | nextn | ||
| stufe | P_FinStmtHierarchy | stufe | ||
| ergs2 | P_FinStmtHierarchy | ergs2 | ||
| segment | P_FinStmtHierarchy | segment | ||
| GLAccount | I_GLAccountInCompanyCode | GLAccount |
@VDM.private:true
@VDM.viewType: #BASIC
@AbapCatalog.sqlViewName: 'PFSITEMHIERCOCD'
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
define view P_FinStmtHierarchyWithCocd
as select from P_FinStmtHierarchy
inner join I_CompanyCode on P_FinStmtHierarchy.ktopl = I_CompanyCode.ChartOfAccounts
left outer join I_GLAccountInCompanyCode as _GLAccountInCompanyCode on saknr = _GLAccountInCompanyCode.GLAccount
and I_CompanyCode.CompanyCode = _GLAccountInCompanyCode.CompanyCode
{
key P_FinStmtHierarchy.HierarchyUniqueNodeID,
key P_FinStmtHierarchy.UniqueParentID,
key P_FinStmtHierarchy.versn,
key P_FinStmtHierarchy.ergsl,
key P_FinStmtHierarchy.ktopl,
key I_CompanyCode.CompanyCode as bukrs,
key P_FinStmtHierarchy.saknr,
key P_FinStmtHierarchy.fkber,
P_FinStmtHierarchy.type,
P_FinStmtHierarchy.Description,
P_FinStmtHierarchy.MaintenanceLanguage,
P_FinStmtHierarchy.id,
P_FinStmtHierarchy.parent,
P_FinStmtHierarchy.child,
P_FinStmtHierarchy.nextn,
P_FinStmtHierarchy.stufe,
P_FinStmtHierarchy.ergs2,
P_FinStmtHierarchy.segment,
_GLAccountInCompanyCode.GLAccount
}
where
(
GLAccount is null
and type <> 'L'
)
or(
GLAccount is not null
and type = 'L'
)
//where ( GLAccount = '' and type <> 'L' ) OR ( GLAccount <> '' and type = 'L' )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_GLACCOUNTINCOMPANYCODE",
"P_FINSTMTHIERARCHY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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