@AbapCatalog.sqlViewName : 'PFINTRSFLOWTWOD'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey: true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_FinTransFlowWithTwoDirection
with parameters
@Environment.systemField: #SYSTEM_DATE
P_KeyDate : vdm_v_key_date
as select from R_FinTransCashFlowActivity as Main
inner join R_FinTransFlow as Flow on Main.CompanyCode = Flow.CompanyCode
and Main.FinancialTransaction = Flow.FinancialTransaction
and Main.FinancialInstrumentActivity = Flow.FinancialInstrumentActivity
{
key Flow.CompanyCode as CompanyCode,
key Flow.FinancialTransaction as FinancialTransaction,
Main.FinancialInstrProductCategory,
cast ( case when Flow.FinTransFlowPaytAmtDirection = '+'
then Flow.FinTransFlowNomAmt
else Flow.FinTransFlowNomAmt * -1
end as ftr_flow_norminal_amount )
as FinTransFlowNomAmt,
Flow.FinTransFlowNomAmtCrcy,
Flow.FinancialTransactionDirection as FinancialTransactionDirection,
Flow.FinTransFlowPaytAmtDirection,
case when Main.FinancialInstrProductCategory = '600'
then Flow.FinTransFlowSource
end as FinTransFlowSource
}
where
(
Flow.FinTransFlowPostingBlkgReason <> '2'
and Flow.FinTransFlowPostingBlkgReason <> '4'
and Flow.FinTransFlowPostingBlkgReason <> '5'
and Flow.FinTransFlowPostingBlkgReason <> '6'
and Flow.FinTransFlowPostingStatus <> '3'
and Flow.FinTransFlowPostingStatus <> '4'
and (
(
Flow.FinTransFlowCategory = '10'
or Flow.FinTransFlowCategory = '11'
or Flow.FinTransFlowCategory = '12' // repayment
or Flow.FinTransFlowCategory = '13' // Installment Repayment
or Flow.FinTransFlowCategory = '14' // annuity repayment
or Flow.FinTransFlowCategory = '15' // Capitalization
or Flow.FinTransFlowCategory = '16' // Capitalized Payment
)
and Flow.FinTransFlowPaymentDate <= $parameters .P_KeyDate
and Main.FinancialInstrProductCategory = '620'
)
)
or (
Main.FinancialInstrProductCategory = '600'
and ( Flow.FinTransFlowSource = 'LEA2' or Flow.FinTransFlowSource = 'LEA1' )
)
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"R_FINTRANSCASHFLOWACTIVITY",
"R_FINTRANSFLOW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_FinTransFlowWithTwoDirection view