P_ShrtTrmCshPosCshPoolHier

DDL: P_SHRTTRMCSHPOSCSHPOOLHIER SQL: PSTCPCPLHIER Type: view COMPOSITE

P_ShrtTrmCshPosCshPoolHier is a Composite CDS View in SAP S/4HANA. It reads from 11 data sources and exposes 110 fields with key fields CashPositionProfile, CompanyCodeendasCashPositionHierNode, CashPositionHierNode, CashPositionHierNode, CashPositionHierNode. It has 5 associations to related views.

Data Sources (11)

SourceAliasJoin Type
P_ShrtTrmCshPosBankAccount _Account inner
P_ShrtTrmCshPosBankAccount _Account inner
I_CashPositionProfile _Profile inner
I_CashPositionProfile _Profile inner
I_CashPositionProfile _Profile inner
I_CashPositionProfile _Profile inner
I_CashPoolAssgmtForKeyDate I_CashPoolAssgmtForKeyDate from
I_CashPoolAssgmtForKeyDate I_CashPoolAssgmtForKeyDate union_all
I_CashPoolAssgmtForKeyDate I_CashPoolAssgmtForKeyDate union_all
P_ShrtTrmCshPosAccWithProfile P_ShrtTrmCshPosAccWithProfile inner
P_ShrtTrmCshPosAccWithProfile P_ShrtTrmCshPosAccWithProfile union_all

Parameters (1)

NameTypeDefault
P_CashPositionProfile fclm_cp_profile_name

Associations (5)

CardinalityTargetAliasCondition
[0..*] I_CashPoolAssgmtForKeyDate _CrsCshPoolSubAcctHierNode $projection.CashPool <> _CrsCshPoolSubAcctHierNode.CashPool and $projection.BankAccountInternalID = _CrsCshPoolSubAcctHierNode.BankAccountInternalID and $projection.CashPoolAssgmtIsHeadBkAcct = 'X' and _CrsCshPoolSubAcctHierNode.CashPoolAssgmtIsHeadBkAcct = ''
[0..*] I_CashPoolAssgmtForKeyDate _CrsCshPoolHdrAcctHierNode $projection.CashPool <> _CrsCshPoolHdrAcctHierNode.CashPool and $projection.BankAccountInternalID = _CrsCshPoolHdrAcctHierNode.BankAccountInternalID and $projection.CashPoolAssgmtIsHeadBkAcct = '' and _CrsCshPoolHdrAcctHierNode.CashPoolAssgmtIsHeadBkAcct = 'X'
[0..*] I_CashPoolAssgmtForKeyDate _IdenticalCshPoolParNode $projection.CashPool = _IdenticalCshPoolParNode.CashPool and $projection.CashPoolAssgmtIsHeadBkAcct = '' and _IdenticalCshPoolParNode.CashPoolAssgmtIsHeadBkAcct = 'X'
[0..*] I_CashPoolAssgmtForKeyDate _IdenticalCshPoolGrandParNode _ParentPoolLeftJoin.CashPool = _IdenticalCshPoolGrandParNode.CashPool and _ParentPoolLeftJoin.CashPoolAssgmtIsHeadBkAcct = '' and _IdenticalCshPoolGrandParNode.CashPoolAssgmtIsHeadBkAcct = 'X'
[0..1] I_CashPool_2 _CashPool $projection.CashPool = _CashPool.CashPool

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PSTCPCPLHIER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (110)

KeyFieldSource TableSource FieldDescription
KEY CashPositionProfile I_CashPositionProfile CashPositionProfile Setup Mat. Prof.
KEY CompanyCodeendasCashPositionHierNode
CashPositionHierNodeValue P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
CashPositionHierNodeType
CashPositionHierNextNodeType
CshPoolAssgmtHierNode _Basic CashPoolAssignment Cash Pool Assignment
BankAccountInternalID _Basic BankAccountInternalID Technical ID
Bank P_ShrtTrmCshPosBankAccount Bank Bank Number
BankAccountCurrency P_ShrtTrmCshPosBankAccount BankAccountCurrency Currency
BankAccountNumber P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
BankCountry P_ShrtTrmCshPosBankAccount BankCountry Bank Ctry/Rgn. Key
CompanyCode P_ShrtTrmCshPosBankAccount CompanyCode Receiver Company Code
Country P_ShrtTrmCshPosBankAccount Country Venue: Ctry/Reg
RiskPartnerNo P_ShrtTrmCshPosBankAccount RiskPartnerNo Busn. Partner
CashPool _Basic CashPool Cash Pool Name
CashPoolAssignmentText _Basic CashPoolAssignmentText Account Name (Cash Pool)
CashPoolAssgmtIsHeadBkAcct _Basic CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPoolAssgmtValdtyStrtDte _Basic CashPoolAssgmtValdtyStrtDte Valid From
CashPoolAssgmtValdtyEndDte _Basic CashPoolAssgmtValdtyEndDte Valid To
CashPoolAssgmtIsDeleted _Basic CashPoolAssgmtIsDeleted Marked for Deletion
CrsCshPoolSubAcctHierNode
CrsCshPoolHdrAcctHierNode
IdenticalCshPoolParNode
IdenticalCshPoolGrandParNode
ParentCashPool _ParentPoolLeftJoin CashPool Cash Pool Name
ParCshPoolAssgmtIsHeadBkAcct _ParentPoolLeftJoin CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPositionProfileasCashPositionProfile
KEY CashPositionHierNode
CashPositionHierParentNode
CashPositionHierNodeValue P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
CashPositionHierNodeType
CashPositionHierNextNodeType
CshPoolAssgmtHierNode _Basic CashPoolAssignment Cash Pool Assignment
BankAccountInternalID _Basic BankAccountInternalID Technical ID
Bank P_ShrtTrmCshPosBankAccount Bank Bank Number
BankAccountCurrency P_ShrtTrmCshPosBankAccount BankAccountCurrency Currency
BankAccountNumber P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
BankCountry P_ShrtTrmCshPosBankAccount BankCountry Bank Ctry/Rgn. Key
CompanyCode P_ShrtTrmCshPosBankAccount CompanyCode Receiver Company Code
Country P_ShrtTrmCshPosBankAccount Country Venue: Ctry/Reg
RiskPartnerNo P_ShrtTrmCshPosBankAccount RiskPartnerNo Busn. Partner
CashPool _Basic CashPool Cash Pool Name
CashPoolAssignmentText _Basic CashPoolAssignmentText Account Name (Cash Pool)
CashPoolAssgmtIsHeadBkAcct _Basic CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPoolAssgmtValdtyStrtDte _Basic CashPoolAssgmtValdtyStrtDte Valid From
CashPoolAssgmtValdtyEndDte _Basic CashPoolAssgmtValdtyEndDte Valid To
CashPoolAssgmtIsDeleted _Basic CashPoolAssgmtIsDeleted Marked for Deletion
CrsCshPoolSubAcctHierNode
CrsCshPoolHdrAcctHierNode
IdenticalCshPoolParNode
IdenticalCshPoolGrandParNode
ParentCashPool _ParentPoolLeftJoin CashPool Cash Pool Name
ParCshPoolAssgmtIsHeadBkAcct _ParentPoolLeftJoin CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPositionProfileasCashPositionProfile
KEY CashPositionHierNode
CashPositionHierParentNode
CashPositionHierNodeValue P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
CashPositionHierNodeType
CashPositionHierNextNodeType
CshPoolAssgmtHierNode _Basic CashPoolAssignment Cash Pool Assignment
BankAccountInternalID _Basic BankAccountInternalID Technical ID
Bank P_ShrtTrmCshPosBankAccount Bank Bank Number
BankAccountCurrency P_ShrtTrmCshPosBankAccount BankAccountCurrency Currency
BankAccountNumber P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
BankCountry P_ShrtTrmCshPosBankAccount BankCountry Bank Ctry/Rgn. Key
CompanyCode P_ShrtTrmCshPosBankAccount CompanyCode Receiver Company Code
Country P_ShrtTrmCshPosBankAccount Country Venue: Ctry/Reg
RiskPartnerNo P_ShrtTrmCshPosBankAccount RiskPartnerNo Busn. Partner
CashPool _Basic CashPool Cash Pool Name
CashPoolAssignmentText _Basic CashPoolAssignmentText Account Name (Cash Pool)
CashPoolAssgmtIsHeadBkAcct _Basic CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPoolAssgmtValdtyStrtDte _Basic CashPoolAssgmtValdtyStrtDte Valid From
CashPoolAssgmtValdtyEndDte _Basic CashPoolAssgmtValdtyEndDte Valid To
CashPoolAssgmtIsDeleted _Basic CashPoolAssgmtIsDeleted Marked for Deletion
CshPoolAssgmtHierParNode
CrsCshPoolSubAcctHierNode
CrsCshPoolHdrAcctHierNode
IdenticalCshPoolParNode
IdenticalCshPoolGrandParNode
ParentCashPool _ParentPoolLeftJoin CashPool Cash Pool Name
ParCshPoolAssgmtIsHeadBkAcct _ParentPoolLeftJoin CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPositionProfileasCashPositionProfile
KEY CashPositionHierNode
CashPositionHierParentNode
CashPositionHierNodeValue P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
CashPositionHierNodeType
CashPositionHierNextNodeType
CshPoolAssgmtHierNode Cash Pool Assignment
BankAccountInternalID P_ShrtTrmCshPosBankAccount BankAccountInternalID Technical ID
Bank P_ShrtTrmCshPosBankAccount Bank Bank Number
BankAccountCurrency P_ShrtTrmCshPosBankAccount BankAccountCurrency Currency
BankAccountNumber P_ShrtTrmCshPosBankAccount BankAccountNumber Bank Account
BankCountry P_ShrtTrmCshPosBankAccount BankCountry Bank Ctry/Rgn. Key
CompanyCode P_ShrtTrmCshPosBankAccount CompanyCode Receiver Company Code
Country P_ShrtTrmCshPosBankAccount Country Venue: Ctry/Reg
RiskPartnerNo P_ShrtTrmCshPosBankAccount RiskPartnerNo Busn. Partner
CashPool _Basic CashPool Cash Pool Name
CashPoolAssignmentText Account Name (Cash Pool)
CashPoolAssgmtIsHeadBkAcct Assigned as Header
CashPoolAssgmtValdtyStrtDte Valid From
CashPoolAssgmtValdtyEndDte Valid To
CashPoolAssgmtIsDeleted Marked for Deletion
CshPoolAssgmtHierParNode
CrsCshPoolSubAcctHierNode
CrsCshPoolHdrAcctHierNode
IdenticalCshPoolParNode
IdenticalCshPoolGrandParNode
ParentCashPool Cash Pool Name
ParCshPoolAssgmtIsHeadBkAcct Assigned as Header
_CashPool _CashPool

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_ShrtTrmCshPosCshPoolHier.
-- 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: PSTCPCPLHIER
-- Parameters: P_CashPositionProfile : fclm_cp_profile_name

CREATE VIEW P_ShrtTrmCshPosCshPoolHier AS
SELECT
  _Profile.CashPositionProfile AS CashPositionProfile,
  case when _CrsCshPoolHdrAcctHierNode(P_KeyDate:$session.user_date).CashPoolAssignment is not null then concat(_Basic.BankAccountInternalID, concat(_Basic.BankAccountCurrency, _IdenticalCshPoolParNode(P_KeyDate:$session.user_date).CompanyCode)) when _CrsCshPoolHdrAcctHierNode(P_KeyDate:$session.user_date).CashPoolAssignment is null then concat(_Basic.BankAccountInternalID, concat(_Basic.BankAccountCurrency, _Basic.CompanyCode)) end as CashPositionHierNode AS CompanyCodeendasCashPositionHierNode,
  _Account.BankAccountNumber AS CashPositionHierNodeValue,
  'BA' AS CashPositionHierNodeType,
  '' AS CashPositionHierNextNodeType,
  _Basic.CashPoolAssignment AS CshPoolAssgmtHierNode,
  _Basic.BankAccountInternalID AS BankAccountInternalID,
  _Account.Bank AS Bank,
  _Account.BankAccountCurrency AS BankAccountCurrency,
  _Account.BankAccountNumber AS BankAccountNumber,
  _Account.BankCountry AS BankCountry,
  _Account.CompanyCode AS CompanyCode,
  _Account.Country AS Country,
  _Account.RiskPartnerNo AS RiskPartnerNo,
  _Basic.CashPool AS CashPool,
  _Basic.CashPoolAssignmentText AS CashPoolAssignmentText,
  _Basic.CashPoolAssgmtIsHeadBkAcct AS CashPoolAssgmtIsHeadBkAcct,
  _Basic.CashPoolAssgmtValdtyStrtDte AS CashPoolAssgmtValdtyStrtDte,
  _Basic.CashPoolAssgmtValdtyEndDte AS CashPoolAssgmtValdtyEndDte,
  _Basic.CashPoolAssgmtIsDeleted AS CashPoolAssgmtIsDeleted,
  _CrsCshPoolSubAcctHierNode(P_KeyDate:$session.user_date).CashPoolAssignment AS CrsCshPoolSubAcctHierNode,
  _CrsCshPoolHdrAcctHierNode(P_KeyDate:$session.user_date).CashPoolAssignment AS CrsCshPoolHdrAcctHierNode,
  _IdenticalCshPoolParNode(P_KeyDate:$session.user_date).CashPoolAssignment AS IdenticalCshPoolParNode,
  _IdenticalCshPoolGrandParNode(P_KeyDate:$session.user_date).CashPoolAssignment AS IdenticalCshPoolGrandParNode,
  _ParentPoolLeftJoin.CashPool AS ParentCashPool,
  _ParentPoolLeftJoin.CashPoolAssgmtIsHeadBkAcct AS ParCshPoolAssgmtIsHeadBkAcct,
  concat(_Basic.BankAccountInternalID, concat(_IdenticalCshPoolParNode(P_KeyDate:$session.user_date).BankAccountInternalID, concat(_Basic.BankAccountCurrency, _IdenticalCshPoolParNode(P_KeyDate:$session.user_date).CompanyCode))) AS CashPositionHierNode,
  concat(_IdenticalCshPoolParNode(P_KeyDate:$session.user_date).BankAccountInternalID, concat(_Basic.BankAccountCurrency, _IdenticalCshPoolParNode(P_KeyDate:$session.user_date).CompanyCode)) AS CashPositionHierParentNode,
  _IdenticalCshPoolParNode(P_KeyDate:$session.user_date).CashPoolAssignment AS CshPoolAssgmtHierParNode
FROM I_CashPoolAssgmtForKeyDate
INNER JOIN I_CashPositionProfile AS _Profile ON /* join condition not captured in parsed metadata */
INNER JOIN P_ShrtTrmCshPosAccWithProfile ON /* join condition not captured in parsed metadata */
INNER JOIN P_ShrtTrmCshPosBankAccount AS _Account ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CashPoolAssgmtForKeyDate AS _CrsCshPoolSubAcctHierNode ON CashPool <> _CrsCshPoolSubAcctHierNode.CashPool AND BankAccountInternalID = _CrsCshPoolSubAcctHierNode.BankAccountInternalID AND CashPoolAssgmtIsHeadBkAcct = 'X' AND _CrsCshPoolSubAcctHierNode.CashPoolAssgmtIsHeadBkAcct = ''  -- association [0..*]
LEFT OUTER JOIN I_CashPoolAssgmtForKeyDate AS _CrsCshPoolHdrAcctHierNode ON CashPool <> _CrsCshPoolHdrAcctHierNode.CashPool AND BankAccountInternalID = _CrsCshPoolHdrAcctHierNode.BankAccountInternalID AND CashPoolAssgmtIsHeadBkAcct = '' AND _CrsCshPoolHdrAcctHierNode.CashPoolAssgmtIsHeadBkAcct = 'X'  -- association [0..*]
LEFT OUTER JOIN I_CashPoolAssgmtForKeyDate AS _IdenticalCshPoolParNode ON CashPool = _IdenticalCshPoolParNode.CashPool AND CashPoolAssgmtIsHeadBkAcct = '' AND _IdenticalCshPoolParNode.CashPoolAssgmtIsHeadBkAcct = 'X'  -- association [0..*]
LEFT OUTER JOIN I_CashPoolAssgmtForKeyDate AS _IdenticalCshPoolGrandParNode ON _ParentPoolLeftJoin.CashPool = _IdenticalCshPoolGrandParNode.CashPool AND _ParentPoolLeftJoin.CashPoolAssgmtIsHeadBkAcct = '' AND _IdenticalCshPoolGrandParNode.CashPoolAssgmtIsHeadBkAcct = 'X'  -- association [0..*]
LEFT OUTER JOIN I_CashPool_2 AS _CashPool ON CashPool = _CashPool.CashPool  -- association [0..1]
-- UNION ALL with additional select branch(es): I_CashPoolAssgmtForKeyDate, P_ShrtTrmCshPosAccWithProfile
;