P_CshPosSTStrucAgg

DDL: P_CSHPOSSTSTRUCAGG SQL: PCSHPOSSTSTRUCA Type: view COMPOSITE

P_CshPosSTStrucAgg is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_CshPosLim, P_CshPosSTUni) and exposes 12 fields with key fields CompanyCode, BankAccountInternalID, BankAccountCurrency.

Data Sources (2)

SourceAliasJoin Type
P_CshPosLim P_CshPosLim left_outer
P_CshPosSTUni P_CshPosSTUni from

Parameters (3)

NameTypeDefault
P_KeyDate sydate
P_Interval integer
P_Profile prof_name

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PCSHPOSSTSTRUCA view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode cp CompanyCode Receiver Company Code
KEY BankAccountInternalID cp BankAccountInternalID Technical ID
KEY BankAccountCurrency cp BankAccountCurrency Currency
BankAccount
Bank
BankCountry
OpeningBalance
CashInflow
CashOutflow
OverdueInflow
OverdueOutflow
OverdraftLimitAmount

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_CshPosSTStrucAgg.
-- 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: PCSHPOSSTSTRUCA
-- Parameters: P_KeyDate : sydate, P_Interval : integer, P_Profile : prof_name

CREATE VIEW P_CshPosSTStrucAgg AS
SELECT
  cp.CompanyCode AS CompanyCode,
  cp.BankAccountInternalID AS BankAccountInternalID,
  cp.BankAccountCurrency AS BankAccountCurrency,
  sum(OpeningBalance) AS OpeningBalance,
  sum(CashInflow) AS CashInflow,
  sum(CashOutflow) AS CashOutflow,
  sum(OverdueInflow) AS OverdueInflow,
  sum(OverdueOutflow) AS OverdueOutflow,
  case when OverdraftLimitAmount is null then cast(0 as fqm_amount) else OverdraftLimitAmount end AS OverdraftLimitAmount
FROM P_CshPosSTUni
LEFT OUTER JOIN P_CshPosLim ON /* join condition not captured in parsed metadata */
;