P_ShrtTrmCshPosGrouping
P_ShrtTrmCshPosGrouping is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_CashPositionProfile, P_ShrtTrmCshPosAccWithProfile, P_ShrtTrmCshPosGroupingField) and exposes 116 fields with key fields CashPositionProfile, CashPositionHierNode, CashPositionHierNode, CashPositionHierNode, CashPositionHierNode. It has 8 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CashPositionProfile | I_CashPositionProfile | union_all |
| P_ShrtTrmCshPosAccWithProfile | P_ShrtTrmCshPosAccWithProfile | union_all |
| P_ShrtTrmCshPosGroupingField | P_ShrtTrmCshPosGroupingField | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| p_CashPositionProfile | fclm_cp_profile_name |
Associations (8)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_Bank_2 | _Bank | $projection.BankCountry = _Bank.BankCountry and $projection.Bank = _Bank.BankInternalID |
| [0..1] | I_CurrencyText | _CurrencyText | $projection.BankAccountCurrency = _CurrencyText.Currency and _CurrencyText.Language = $session.system_language |
| [0..1] | I_BankAccount | _BankAccount | $projection.BankAccountInternalID = _BankAccount.BankAccountInternalID |
| [0..1] | I_BusinessPartner | _RiskPartner | $projection.RiskPartnerNo = _RiskPartner.BusinessPartner |
| [0..*] | I_UniversalHierNodeText | _NodeText | $projection.CashPositionHierNode = _NodeText.UniversalHierNodeID |
| [0..*] | I_CountryText | _BankCountryText | $projection.BankCountry = _BankCountryText.Country |
| [0..*] | I_CountryText | _CompanyCountryText | $projection.Country = _CompanyCountryText.Country |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSTCPGROUPING | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (116)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CashPositionProfile | CashPositionProfile | Setup Mat. Prof. | |
| KEY | CashPositionHierNode | |||
| CashPositionHierParentNode | ||||
| CashPositionHierNodeValue | Bank Account | |||
| CashPositionHierNodeType | CashPositionHierLevel3 | Hier. Level 1 | ||
| CashPositionHierNextNodeType | Hier. Level 1 | |||
| BankAccountInternalID | Technical ID | |||
| BankAccountNumber | Bank Account | |||
| CashPool | ||||
| CashPoolAssignmentText | ||||
| CashPoolAssgmtIsHeadBkAcct | ||||
| CashPositionDisplayCurrency | ||||
| CshPoolHierRootBkAcctIntID | Technical ID | |||
| _CompanyCode | _CompanyCode | |||
| _Bank | _Bank | |||
| _CurrencyText | _CurrencyText | |||
| _BankAccount | _BankAccount | |||
| _RiskPartner | _RiskPartner | |||
| _NodeText | _NodeText | |||
| _BankCountryText | _BankCountryText | |||
| CountrykeyCashPositionProfile | ||||
| KEY | CashPositionHierNode | |||
| CashPositionHierParentNode | ||||
| CashPositionHierNodeValue | GroupValue2 | Bank Account | ||
| CashPositionHierNodeType | CashPositionHierLevel2 | Hier. Level 1 | ||
| CashPositionHierNextNodeType | Hier. Level 1 | |||
| BankAccountInternalID | Technical ID | |||
| BankAccountNumber | Bank Account | |||
| CashPool | ||||
| CashPoolAssignmentText | ||||
| CashPoolAssgmtIsHeadBkAcct | ||||
| CashPositionDisplayCurrency | ||||
| CshPoolHierRootBkAcctIntID | Technical ID | |||
| _CompanyCode | _CompanyCode | |||
| _Bank | _Bank | |||
| _CurrencyText | _CurrencyText | |||
| _BankAccount | _BankAccount | |||
| _RiskPartner | _RiskPartner | |||
| _NodeText | _NodeText | |||
| _BankCountryText | _BankCountryText | |||
| CountrykeyCashPositionProfile | ||||
| KEY | CashPositionHierNode | |||
| CashPositionHierParentNode | ||||
| CashPositionHierNodeValue | GroupValue1 | Bank Account | ||
| CashPositionHierNodeType | CashPositionHierLevel1 | Hier. Level 1 | ||
| CashPositionHierNextNodeType | Hier. Level 1 | |||
| BankAccountInternalID | Technical ID | |||
| CompanyCode | Receiver Company Code | |||
| Bank | Bank Number | |||
| BankAccountCurrency | Currency | |||
| Country | Venue: Ctry/Reg | |||
| RiskPartnerNo | Busn. Partner | |||
| BankAccountNumber | Bank Account | |||
| CashPool | ||||
| CashPoolAssignmentText | ||||
| CashPoolAssgmtIsHeadBkAcct | ||||
| CashPositionDisplayCurrency | ||||
| CshPoolHierRootBkAcctIntID | Technical ID | |||
| _CompanyCode | _CompanyCode | |||
| _Bank | _Bank | |||
| _CurrencyText | _CurrencyText | |||
| _BankAccount | _BankAccount | |||
| _RiskPartner | _RiskPartner | |||
| _NodeText | _NodeText | |||
| _BankCountryText | _BankCountryText | |||
| CountrykeyCashPositionProfile | ||||
| CashPositionHierParentNode | ||||
| CashPositionHierNodeType | Hier. Level 1 | |||
| CashPositionHierNextNodeType | CashPositionHierLevel1 | Hier. Level 1 | ||
| BankAccountInternalID | Technical ID | |||
| CompanyCode | Receiver Company Code | |||
| BankCountry | Bank Ctry/Rgn. Key | |||
| Bank | Bank Number | |||
| BankAccountCurrency | Currency | |||
| Country | Venue: Ctry/Reg | |||
| RiskPartnerNo | Busn. Partner | |||
| BankAccountNumber | Bank Account | |||
| CashPool | ||||
| CashPoolAssignmentText | ||||
| CashPoolAssgmtIsHeadBkAcct | ||||
| CashPositionDisplayCurrency | ||||
| CshPoolHierRootBkAcctIntID | Technical ID | |||
| _CompanyCode | _CompanyCode | |||
| _Bank | _Bank | |||
| _CurrencyText | _CurrencyText | |||
| _BankAccount | _BankAccount | |||
| _RiskPartner | _RiskPartner | |||
| _NodeText | _NodeText | |||
| _BankCountryText | _BankCountryText | |||
| CountrykeyCashPositionProfile | ||||
| KEY | CashPositionHierNode | |||
| CashPositionHierParentNode | ||||
| CashPositionHierNodeValue | BankAccountNumber | Bank Account | ||
| CashPositionHierNodeType | Hier. Level 1 | |||
| CashPositionHierNextNodeType | Hier. Level 1 | |||
| BankAccountInternalID | BankAccountInternalID | Technical ID | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| BankCountry | BankCountry | Bank Ctry/Rgn. Key | ||
| Bank | Bank | Bank Number | ||
| BankAccountCurrency | BankAccountCurrency | Currency | ||
| Country | Country | Venue: Ctry/Reg | ||
| RiskPartnerNo | RiskPartnerNo | Busn. Partner | ||
| BankAccountNumber | BankAccountNumber | Bank Account | ||
| CashPool | ||||
| CashPoolAssignmentText | ||||
| CashPoolAssgmtIsHeadBkAcct | ||||
| CashPositionDisplayCurrency | ||||
| CshPoolHierRootBkAcctIntID | BankAccountInternalID | Technical ID | ||
| _CompanyCode | _CompanyCode | |||
| _Bank | _Bank | |||
| _CurrencyText | _CurrencyText | |||
| _BankAccount | _BankAccount | |||
| _RiskPartner | _RiskPartner | |||
| _NodeText | _NodeText | |||
| _BankCountryText | _BankCountryText | |||
| _CompanyCountryText | _CompanyCountryText |
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_ShrtTrmCshPosGrouping.
-- 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: PSTCPGROUPING
-- Parameters: p_CashPositionProfile : fclm_cp_profile_name
CREATE VIEW P_ShrtTrmCshPosGrouping AS
SELECT
CashPositionProfile,
concat(coalesce(GroupValue3,'#'), concat(coalesce(GroupValue2,'#'),coalesce(GroupValue1, '#')) ) AS CashPositionHierNode,
concat(coalesce(GroupValue2,'#'), coalesce(GroupValue1,'#')) AS CashPositionHierParentNode,
cast(GroupValue3 as fclm_cp_hiernode_value) AS CashPositionHierNodeValue,
CashPositionHierLevel3 AS CashPositionHierNodeType,
'BA' AS CashPositionHierNextNodeType,
cast('' as fclm_bam_acc_id ) AS BankAccountInternalID,
cast('' as fclm_bam_acc_num ) AS BankAccountNumber,
cast('' as fclm_cpl_name) AS CashPool,
cast('' as fclm_cpl_assgn_text) AS CashPoolAssignmentText,
cast('' as fclm_cpl_assgn_is_head_acc) AS CashPoolAssgmtIsHeadBkAcct,
cast('' as waers) AS CashPositionDisplayCurrency,
cast('' as fclm_bam_acc_id) AS CshPoolHierRootBkAcctIntID,
cast(case when CashPositionHierLevel1 = '01' then GroupValue1 else '' end as bukrs ) AS CompanyCode,
cast(case when CashPositionHierLevel1 = '03' then substring(GroupValue1, 3,15) else '' end as bankl ) AS Bank,
cast(case when CashPositionHierLevel1 = '04' then GroupValue1 else '' end as waers) AS BankAccountCurrency,
cast(case when CashPositionHierLevel1 = '05' then GroupValue1 else '' end as land1 ) AS Country,
cast( case when CashPositionHierLevel1 = '06' then GroupValue1 else '' end as bu_partner ) AS RiskPartnerNo,
'' AS BankCountry
FROM P_ShrtTrmCshPosGroupingField
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_Bank_2 AS _Bank ON BankCountry = _Bank.BankCountry AND Bank = _Bank.BankInternalID -- association [0..1]
LEFT OUTER JOIN I_CurrencyText AS _CurrencyText ON BankAccountCurrency = _CurrencyText.Currency AND _CurrencyText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_BankAccount AS _BankAccount ON BankAccountInternalID = _BankAccount.BankAccountInternalID -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _RiskPartner ON RiskPartnerNo = _RiskPartner.BusinessPartner -- association [0..1]
LEFT OUTER JOIN I_UniversalHierNodeText AS _NodeText ON CashPositionHierNode = _NodeText.UniversalHierNodeID -- association [0..*]
LEFT OUTER JOIN I_CountryText AS _BankCountryText ON BankCountry = _BankCountryText.Country -- association [0..*]
LEFT OUTER JOIN I_CountryText AS _CompanyCountryText ON Country = _CompanyCountryText.Country -- association [0..*]
-- UNION ALL with additional select branch(es): I_CashPositionProfile, P_ShrtTrmCshPosAccWithProfile
;
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