P_CashFlowDetailedAnalysis
P_CashFlowDetailedAnalysis is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CashFlow) and exposes 30 fields.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CashFlow | flow | from |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_StartDate | sydate | |
| P_EndDate | sydate | |
| P_DisplayCurrency | vdm_v_display_currency | |
| P_KeyDate | vdm_v_key_date |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCASHFDA | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (30)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| BankAccountInternalID | I_CashFlow | BankAccountInternalID | ||
| BusinessPartner | I_CashFlow | BusinessPartner | ||
| BusinessArea | I_CashFlow | BusinessArea | ||
| CompanyCode | I_CashFlow | CompanyCode | ||
| CostCenter | I_CashFlow | CostCenter | ||
| ControllingArea | ||||
| Customer | I_CashFlow | Customer | ||
| HouseBank | I_CashFlow | HouseBank | ||
| HouseBankAccount | I_CashFlow | HouseBankAccount | ||
| LiquidityItem | I_CashFlow | LiquidityItem | ||
| PlanningUnit | ||||
| CashPlanningGroup | I_CashFlow | CashPlanningGroup | ||
| PlanningLevel | I_CashFlow | PlanningLevel | ||
| ProfitCenter | I_CashFlow | ProfitCenter | ||
| Segment | I_CashFlow | Segment | ||
| TradingPartner | I_CashFlow | PartnerCompany | ||
| Supplier | I_CashFlow | Supplier | ||
| WBSElement | ||||
| WBSElement | ||||
| CertaintyLevel | I_CashFlow | CertaintyLevel | ||
| TransactionCurrency | I_CashFlow | BankAccountCurrency | ||
| OriginalTransactionCurrency | I_CashFlow | TransactionCurrency | ||
| CompanyCountry | ||||
| PayingCompanyCode | ||||
| SourceCompanyCode | I_CashFlow | SourceCompanyCode | ||
| CalendarDay | I_CashFlow | TransactionDate | ||
| FiscalYear | I_CashFlow | FiscalYear | ||
| FiscalYearVariant | ||||
| PostingPeriod | ||||
| ExpirationDate | I_CashFlow | ExpirationDate |
@AbapCatalog.sqlViewName: 'PCASHFDA'
//@EndUserText.label: 'Cash flow Detailed Analysis' //same as DDL description
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@Metadata.ignorePropagatedAnnotations: true
define view P_CashFlowDetailedAnalysis
with parameters
P_StartDate : sydate,
P_EndDate : sydate,
P_DisplayCurrency : vdm_v_display_currency,
P_KeyDate : vdm_v_key_date
as select from I_CashFlow as flow
{
flow.BankAccountInternalID,
flow.BusinessPartner,
flow.BusinessArea,
flow.CompanyCode,
flow.CostCenter,
flow._CompanyCode.ControllingArea,
flow.Customer,
flow.HouseBank,
flow.HouseBankAccount,
flow.LiquidityItem,
--flow.PlanningUnit,
flow.CashPlanningGroup,
flow.PlanningLevel,
flow.ProfitCenter,
flow.Segment,
flow.PartnerCompany as TradingPartner,
flow.Supplier,
--flow.WBSElement,
flow._WBSElement.WBSElement as WBSElement,
flow.CertaintyLevel,
flow.BankAccountCurrency as TransactionCurrency,
flow.TransactionCurrency as OriginalTransactionCurrency,
//flow.TransactionCurrency,
flow._CompanyCode.Country as CompanyCountry,
---flow.PayingCompanyCode,
flow.SourceCompanyCode,
//Time dimensions
flow.TransactionDate as CalendarDay,
// _Date.YearWeek as CalendarYearWeek,
// _Date.YearMonth as CalendarYearMonth,
// _Date.YearQuarter as CalendarYearQuarter,
// _Date.CalendarYear as CalendarYear,
flow.FiscalYear,
flow._CompanyCode.FiscalYearVariant,
'' as PostingPeriod,
case when AmountInTransactionCurrency < 0
then currency_conversion( amount => flow.AmountInTransactionCurrency,
source_currency => flow.TransactionCurrency,
target_currency => flow.BankAccountCurrency,
exchange_rate_type=> 'M', --config
exchange_rate_date => $parameters.P_KeyDate,
error_handling => 'FAIL_ON_ERROR')
else 0 end as CashOut,
case when AmountInTransactionCurrency < 0
then currency_conversion( amount => flow.AmountInTransactionCurrency,
source_currency => flow.TransactionCurrency,
target_currency => $parameters.P_DisplayCurrency,
exchange_rate_type=> 'M', --config
exchange_rate_date => $parameters.P_KeyDate,
error_handling => 'FAIL_ON_ERROR')
else 0 end as CashOutConverted,
case when AmountInTransactionCurrency >= 0
then currency_conversion( amount => flow.AmountInTransactionCurrency,
source_currency => flow.TransactionCurrency,
target_currency => flow.BankAccountCurrency,
exchange_rate_type=> 'M', --config
exchange_rate_date => $parameters.P_KeyDate,
error_handling => 'FAIL_ON_ERROR')
else 0 end as CashIn,
case when AmountInTransactionCurrency >= 0
then currency_conversion( amount => flow.AmountInTransactionCurrency,
source_currency => flow.TransactionCurrency,
target_currency => $parameters.P_DisplayCurrency,
exchange_rate_type=> 'M', --config
exchange_rate_date => $parameters.P_KeyDate,
error_handling => 'FAIL_ON_ERROR')
else 0 end as CashInConverted,
flow.ExpirationDate
//case when DebitCreditCode = 'S' then flow.AmountInTransactionCurrency else 0 end as CashIn
}
where flow.CertaintyLevel = 'ACTUAL' and
flow.ExpirationDate >= $parameters.P_KeyDate and
flow.TransactionDate between :P_StartDate and :P_EndDate and
flow.IsValid = 'X' ;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CASHFLOW",
"I_COMPANYCODE",
"I_WBSELEMENTBYINTERNALKEY"
],
"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