P_FSTMT_GLACCOUNT_ENH
P_FSTMT_GLACCOUNT_ENH is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (R_HierRuntimeRprstnNodeAttrib, R_HierRuntimeRprstnNode) and exposes 15 fields with key fields Ledger, CompanyCode, GLAccount.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| R_HierRuntimeRprstnNodeAttrib | attr | left_outer |
| R_HierRuntimeRprstnNode | node | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| p_keydate | abap.dats | |
| p_hierarchy | hryid |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFSTMT_GLACCTEN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Ledger | Ledger | ||
| KEY | CompanyCode | acct | CompanyCode | |
| KEY | GLAccount | acct | GLAccount | |
| FSVAccount | acct | FSVAccount | ||
| AlternativeGLAccount | acct | AlternativeGLAccount | ||
| CorporateGroupAccount | acct | CorporateGroupAccount | ||
| hierarchy | R_HierRuntimeRprstnNode | HierarchyID | ||
| hryver | R_HierRuntimeRprstnNode | HierarchyVersion | ||
| AccountIsOpenItemManaged | acct | AccountIsOpenItemManaged | ||
| aging | header | HierAttributeRangeFromVal | ||
| Node | R_HierRuntimeRprstnNode | HierarchyNode | ||
| ParentNode | ||||
| NodeLevel | R_HierRuntimeRprstnNode | HierarchyNodeLevel | ||
| NodeValue | R_HierRuntimeRprstnNode | HierarchyNodeVal | ||
| AgingIncrement | R_HierRuntimeRprstnNodeAttrib | HierNodeAttributeRangeFromVal |
@AbapCatalog.sqlViewName: 'PFSTMT_GLACCTEN'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
//@EndUserText.label: 'GL account info regarding reclass'
@ObjectModel.usageType : { dataClass: #CUSTOMIZING,
serviceQuality: #D,
sizeCategory: #S }
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_FSTMT_GLACCOUNT_ENH with parameters
p_keydate :abap.dats,
p_hierarchy :hryid
as select distinct from P_FSTMT_MAP_ACCT_HIER( p_keydate:$parameters.p_keydate , p_hierarchy:$parameters.p_hierarchy ) as acct
left outer join R_HierRuntimeRprstnNode as node on node.HierarchyNodeClass = acct.hier_CoA
and node.HierarchyID = $parameters.p_hierarchy
and node.HierarchyNodeVal = acct.FSVAccount
and node.ValidityEndDate >= $parameters.p_keydate
and node.ValidityStartDate <= $parameters.p_keydate
and node.NodeType = 'L'
left outer join R_HierRuntimeRprstnNodeAttrib as attr on attr.HierarchyID = node.HierarchyID
and attr.ValidityEndDate = node.ValidityEndDate
and attr.HierarchyNode = node.HierarchyNode
and attr.HierarchyNodeClass = acct.hier_CoA
and attr.ParentNode = node.ParentNode
and attr.HierarchyNodeAttributeName = 'REGROUPING'
left outer to one join R_HierRuntimeRprstnAttrib as header on header.HierarchyID = $parameters.p_hierarchy
and header.ValidityEndDate = node.ValidityEndDate
and header.HierarchyAttributeName = 'AGING'
{
key Ledger as Ledger,
key acct.CompanyCode as CompanyCode,
key acct.GLAccount as GLAccount,
acct.FSVAccount as FSVAccount,
acct.AlternativeGLAccount as AlternativeGLAccount,
acct.CorporateGroupAccount as CorporateGroupAccount,
node.HierarchyID as hierarchy,
node.HierarchyVersion as hryver,
acct.AccountIsOpenItemManaged,
case attr.HierarchyNodeAttributeName
when 'REGROUPING'
then 'X' else '' end as AccountIsToReclassify,
header.HierAttributeRangeFromVal as aging,
node.HierarchyNode as Node,
coalesce( node.ParentNode, '00NOTASSGND' ) as ParentNode,
node.HierarchyNodeLevel as NodeLevel,
node.HierarchyNodeVal as NodeValue,
case node.DebitCreditCode
when 'S' then '+'
when 'H' then '-'
else '' end as plumi,
attr.HierNodeAttributeRangeFromVal as AgingIncrement
// skb.ReconciliationAccountType
// tag.IsFunctionalAreaPermitted
}
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