P_CshPosSTBal
P_CshPosSTBal is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_CashFlow, I_PlngLvlInCshPoolBalPrfl) and exposes 7 fields with key fields CompanyCode, BankAccountInternalID, TransactionCurrency, BankAccountCurrency, CompanyCodeCurrency.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CashFlow | flow | from |
| I_PlngLvlInCshPoolBalPrfl | profile | inner |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | sydate | |
| P_Profile | prof_name |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | PCSHPOSSTBAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | ||
| KEY | BankAccountInternalID | BankAccountInternalID | ||
| KEY | TransactionCurrency | TransactionCurrency | ||
| KEY | BankAccountCurrency | BankAccountCurrency | ||
| KEY | CompanyCodeCurrency | CompanyCodeCurrency | ||
| OpeningBalance | ||||
| OpeningBalanceInCompCrcy |
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PCSHPOSSTBAL'
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view P_CshPosSTBal
with parameters
@Environment.systemField: #SYSTEM_DATE
P_KeyDate : sydate,
P_Profile : prof_name
as select from I_CashFlow as flow
inner join I_PlngLvlInCshPoolBalPrfl as profile on profile.PlanningLevel = flow.PlanningLevel
and profile.CashPoolBalCalcPrfl = $parameters.P_Profile
{
key CompanyCode,
key BankAccountInternalID,
key TransactionCurrency,
key BankAccountCurrency,
key CompanyCodeCurrency,
sum(AmountInTransactionCurrency) as OpeningBalance,
sum(AmountInCompanyCodeCurrency) as OpeningBalanceInCompCrcy
}
where
CertaintyLevel = 'ACTUAL'
and TransactionDate < $parameters.P_KeyDate
and ExpirationDate >= $session.user_date --$parameters.P_KeyDate
and(
ValidFrom <= TSTMP_CURRENT_UTCTIMESTAMP()
and ValidTo >= TSTMP_CURRENT_UTCTIMESTAMP()
)
and CashReleaseStatus = ''
group by
CompanyCode,
BankAccountInternalID,
TransactionCurrency,
BankAccountCurrency,
CompanyCodeCurrency
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CASHFLOW",
"I_PLNGLVLINCSHPOOLBALPRFL"
],
"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