P_CshPosSTBal

DDL: P_CSHPOSSTBAL SQL: PCSHPOSSTBAL Type: view COMPOSITE

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)

SourceAliasJoin Type
I_CashFlow flow from
I_PlngLvlInCshPoolBalPrfl profile inner

Parameters (2)

NameTypeDefault
P_KeyDate sydate
P_Profile prof_name

Annotations (6)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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":""
}
}*/