P_TFTRANSCASHFLOW
P_TFTRANSCASHFLOW is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_FinancialTransaction, vtbfhazu, I_FinancialTransacCashFlow) and exposes 11 fields with key fields CompanyCode, FinancialTransaction.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_FinancialTransaction | FinancialTransaction | from |
| vtbfhazu | TransactionActivity | left_outer |
| I_FinancialTransacCashFlow | TransactionCashFlow | left_outer |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | vdm_v_key_date |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PTFTRANSCF | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AbapCatalog.preserveKey | true | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_FinancialTransacCashFlow | CompanyCode | |
| KEY | FinancialTransaction | I_FinancialTransacCashFlow | FinancialTransaction | |
| FinancialInstrProductCategory | I_FinancialTransacCashFlow | FinancialInstrProductCategory | ||
| FinancialInstrumentProductType | I_FinancialTransacCashFlow | FinancialInstrumentProductType | ||
| FinInstrTransactionCategory | I_FinancialTransacCashFlow | FinInstrTransactionCategory | ||
| FinancialInstrTransactionType | I_FinancialTransacCashFlow | FinancialInstrTransactionType | ||
| Counterparty | I_FinancialTransacCashFlow | Counterparty | ||
| CashFlowCalculationCategory | I_FinancialTransacCashFlow | CashFlowCalculationCategory | ||
| TransactionCurrency | I_FinancialTransaction | TransactionCurrency | ||
| NominalCurrency | I_FinancialTransacCashFlow | NominalCurrency | ||
| DifferentiationPortfolio | I_FinancialTransacCashFlow | DifferentiationPortfolio |
@AbapCatalog.sqlViewName: 'PTFTRANSCF'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AbapCatalog.preserveKey:true
define view P_TFTRANSCASHFLOW
with parameters
@Environment.systemField: #SYSTEM_DATE
P_KeyDate : vdm_v_key_date
as select from I_FinancialTransaction as FinancialTransaction
left outer join vtbfhazu as TransactionActivity on FinancialTransaction.CompanyCode = TransactionActivity.bukrs
and FinancialTransaction.FinancialTransaction = TransactionActivity.rfha
and FinancialTransaction.FinInstrLastActiveActivity = TransactionActivity.rfhazu
left outer join I_FinancialTransacCashFlow as TransactionCashFlow
on TransactionCashFlow.CompanyCode = FinancialTransaction.CompanyCode
and TransactionCashFlow.FinancialTransaction = FinancialTransaction.FinancialTransaction
{
key TransactionCashFlow.CompanyCode,
key TransactionCashFlow.FinancialTransaction,
TransactionCashFlow.FinancialInstrProductCategory,
TransactionCashFlow.FinancialInstrumentProductType,
TransactionCashFlow.FinInstrTransactionCategory,
TransactionCashFlow.FinancialInstrTransactionType,
TransactionCashFlow.Counterparty,
TransactionCashFlow.CashFlowCalculationCategory,
FinancialTransaction.TransactionCurrency,
case TransactionCashFlow.CashFlowDirection
when '+' then -1 * TransactionCashFlow.NominalAmountInNominalCurrency
else TransactionCashFlow.NominalAmountInNominalCurrency
end as NominalAmountInNominalCurrency,
TransactionCashFlow.NominalCurrency,
TransactionCashFlow.DifferentiationPortfolio
} where
FinancialTransaction.FinancialInstrumentStatus = '0' and //active transaction
TransactionActivity.dblfz <= $parameters.P_KeyDate and
( TransactionActivity.delfz > $parameters.P_KeyDate or TransactionActivity.notice_date > $parameters.P_KeyDate ) and //key date is before end date of transaction or terminate
( FinancialTransaction.FinancialInstrProductCategory = '860' or FinancialTransaction.FinancialInstrProductCategory = '850') and
//2. norminal or capitalized interest or install repaymentflow counted
( (( TransactionCashFlow.CashFlowCalculationCategory = 'AA' or TransactionCashFlow.CashFlowCalculationCategory = 'SS' ) and TransactionCashFlow.CalculationDate <= $parameters.P_KeyDate ) or
TransactionCashFlow.CashFlowCalculationCategory = 'TB' )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FINANCIALTRANSACCASHFLOW",
"I_FINANCIALTRANSACTION",
"VTBFHAZU"
],
"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