P_FinTransFlowWithOneDirection

DDL: P_FINTRANSFLOWWITHONEDIRECTION SQL: PFINTRSFLOWONED Type: view COMPOSITE

P_FinTransFlowWithOneDirection is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (R_FinTransFlow, R_FinTransCashFlowActivity) and exposes 8 fields with key fields CompanyCode, FinancialTransaction.

Data Sources (2)

SourceAliasJoin Type
R_FinTransFlow Flow inner
R_FinTransCashFlowActivity Main from

Parameters (1)

NameTypeDefault
P_KeyDate vdm_v_key_date

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PFINTRSFLOWONED view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.preserveKey true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode R_FinTransFlow CompanyCode
KEY FinancialTransaction R_FinTransFlow FinancialTransaction
FinancialInstrProductCategory R_FinTransCashFlowActivity FinancialInstrProductCategory
FinTransFlowNomAmt R_FinTransFlow FinTransFlowNomAmt
FinTransFlowNomAmtCrcy R_FinTransFlow FinTransFlowNomAmtCrcy
FinTransFlowPaytAmtDirection R_FinTransFlow FinTransFlowPaytAmtDirection
FinTransFlowPaytAmt R_FinTransFlow FinTransFlowPaytAmt
FinTransFlowPaytAmtCrcy R_FinTransFlow FinTransFlowPaytAmtCrcy
@AbapCatalog.sqlViewName: 'PFINTRSFLOWONED'
@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_FinTransFlowWithOneDirection
  with parameters
    //parameter needed to get nominal flows valid on key date

    @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
                                                    and (
                                                       (
                                                         (
                                                           Main.FinancialInstrProductCategory       =  '510'
                                                           or Main.FinancialInstrProductCategory    =  '520'
                                                           or Main.FinancialInstrProductCategory    =  '530'
                                                           or Main.FinancialInstrProductCategory    =  '540'
                                                           or Main.FinancialInstrProductCategory    =  '550'
                                                           or Main.FinancialInstrProductCategory    =  '580'
                                                           or Main.FinancialInstrProductCategory    =  '610'
                                                           or Main.FinancialInstrProductCategory    =  '630'
                                                           or Main.FinancialInstrProductCategory    =  '850'
                                                           or Main.FinancialInstrProductCategory    =  '860'
                                                         )
                                                         and(
                                                           Flow.FinTransFlowCategory                =  '10'
                                                           or Flow.FinTransFlowCategory             =  '11'
                                                           or(
                                                             Flow.FinTransFlowCategory              =  '12'
                                                             and Main.FinancialInstrProductCategory <> '850'
                                                             and Main.FinancialInstrProductCategory <> '860'
                                                           ) // repayment

                                                           or Flow.FinTransFlowCategory             =  '13' // Installment Repayment

                                                           or Flow.FinTransFlowCategory             =  '14' // annuity repayment

                                                           or Flow.FinTransFlowCategory             =  '15' // Capitalization

                                                           or Flow.FinTransFlowCategory             =  '16' // Capitalized Payment

                                                         )
                                                       )
                                                       or(
                                                         (
                                                           Main.FinancialInstrProductCategory       =  '850'
                                                           or Main.FinancialInstrProductCategory    =  '860'
                                                         )
                                                         and Flow.FinTransFlowCategory              =  '12'
                                                         and Flow.FinancialInstrumentActivity       =  Main.FinInstrLastActiveActivity
                                                       )
                                                     )
{
  key Flow.CompanyCode,
  key Flow.FinancialTransaction,
      Main.FinancialInstrProductCategory,
      Flow.FinTransFlowNomAmt,
      Flow.FinTransFlowNomAmtCrcy,
      Flow.FinTransFlowPaytAmtDirection,
      Flow.FinTransFlowPaytAmt,
      Flow.FinTransFlowPaytAmtCrcy
}

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.FinTransFlowPaymentDate       <= $parameters.P_KeyDate
      and(
           Main.FinancialInstrProductCategory =  '510'
        or Main.FinancialInstrProductCategory =  '520'
        or Main.FinancialInstrProductCategory =  '530'
        or Main.FinancialInstrProductCategory =  '540'
        or Main.FinancialInstrProductCategory =  '550'
        or Main.FinancialInstrProductCategory =  '580'
        or Main.FinancialInstrProductCategory =  '610'
        or Main.FinancialInstrProductCategory =  '850'
        or Main.FinancialInstrProductCategory =  '860'
      )
    )
    or(
           Main.FinancialInstrProductCategory =  '630'
      and  Flow.FinTransFlowCategory          =  '10'
    )
  )