P_MMSecDebtInvestWithRepymt

DDL: P_MMSECDEBTINVESTWITHREPYMT SQL: PMMSECDIWITHRPMT Type: view COMPOSITE

P_MMSecDebtInvestWithRepymt is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_MMSecDebtInvestWithNPV, I_SecurityClass) and exposes 33 fields with key fields TreasuryFinancialObject, ConditionItemIndex.

Data Sources (2)

SourceAliasJoin Type
P_MMSecDebtInvestWithNPV P_MMSecDebtInvestWithNPV from
I_SecurityClass SecurityClass left_outer

Parameters (4)

NameTypeDefault
P_KeyDate vdm_v_key_date
P_DisplayCurrency vdm_v_display_currency
P_ExchangeRateType kurst
P_RiskAnalyzerKeyFigure afwkf_definition

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMMSECDIWITHRPMT view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY TreasuryFinancialObject MMSecDebtInvestWithNPV TreasuryFinancialObject
KEY ConditionItemIndex MMSecDebtInvestWithNPV ConditionItemIndex
CompanyCode MMSecDebtInvestWithNPV CompanyCode
FinancialTransaction MMSecDebtInvestWithNPV FinancialTransaction
SecurityAccount MMSecDebtInvestWithNPV SecurityAccount
SecurityClass MMSecDebtInvestWithNPV SecurityClass
SecurityAccountGroup MMSecDebtInvestWithNPV SecurityAccountGroup
FinancialInstrProductCategory MMSecDebtInvestWithNPV FinancialInstrProductCategory
FinancialInstrumentProductType MMSecDebtInvestWithNPV FinancialInstrumentProductType
FinancialInstrTransactionType MMSecDebtInvestWithNPV FinancialInstrTransactionType
Counterparty MMSecDebtInvestWithNPV Counterparty
Issuer I_SecurityClass Issuer
IssueCurrencyendasTransactionCurrency
DifferentiationPortfolio MMSecDebtInvestWithNPV DifferentiationPortfolio
TrsyCshFlowDebtInvmtCode MMSecDebtInvestWithNPV TrsyCshFlowDebtInvmtCode
ReferenceInterestRate MMSecDebtInvestWithNPV ReferenceInterestRate
FixedVariableInterestRateCat MMSecDebtInvestWithNPV FixedVariableInterestRateCat
RiskAnalyzerKeyFigure MMSecDebtInvestWithNPV RiskAnalyzerKeyFigure
HasError MMSecDebtInvestWithNPV HasError
ScaleRatio MMSecDebtInvestWithNPV ScaleRatio
NominalCurrency MMSecDebtInvestWithNPV NominalCurrency
PositionCurrency MMSecDebtInvestWithNPV PositionCurrency
ValuationCurrency MMSecDebtInvestWithNPV ValuationCurrency
DisplayCurrency MMSecDebtInvestWithNPV DisplayCurrency
NominalAmountInNominalCurrency MMSecDebtInvestWithNPV NominalAmountInNominalCurrency
BookValueAmtInPositionCurrency
NetPresentValueInValuationCrcy
NominalAmountInReportingCrcy MMSecDebtInvestWithNPV NominalAmountInReportingCrcy
BookValueAmountInReportingCrcy
WITH_RATING
WITHOUT_RATING
_NominalCurrency MMSecDebtInvestWithNPV _NominalCurrency
_DisplayCurrency MMSecDebtInvestWithNPV _DisplayCurrency
@AbapCatalog.sqlViewName: 'PMMSECDIWITHRPMT'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.preserveKey:true 
@VDM.viewType: #COMPOSITE
@VDM.private:true
define view P_MMSecDebtInvestWithRepymt
  with parameters
    P_KeyDate               : vdm_v_key_date,
    P_DisplayCurrency       : vdm_v_display_currency,
    P_ExchangeRateType      : kurst,
    P_RiskAnalyzerKeyFigure : afwkf_definition
  as select from    P_MMSecDebtInvestWithNPV (
                      P_KeyDate               : $parameters.P_KeyDate,
                      P_DisplayCurrency       : $parameters.P_DisplayCurrency,
                      P_ExchangeRateType      : $parameters.P_ExchangeRateType,
                      P_RiskAnalyzerKeyFigure : $parameters.P_RiskAnalyzerKeyFigure) as MMSecDebtInvestWithNPV
    left outer join I_SecurityClass                                                  as SecurityClass on SecurityClass.SecurityClass = MMSecDebtInvestWithNPV.SecurityClass
  //    left outer join ZP_MMRepaymentMethod                                                  as MMRepaymentMethod on MMRepaymentMethod.TreasuryFinancialObject = MMSecDebtInvestWithNPV.TreasuryFinancialObject

  //    left outer join vzzkoko                                                               as SecRepaymentType  on SecRepaymentType.rkey1 = MMSecDebtInvestWithNPV.SecurityClass

{
  key MMSecDebtInvestWithNPV.TreasuryFinancialObject,
  key MMSecDebtInvestWithNPV.ConditionItemIndex,
      MMSecDebtInvestWithNPV.CompanyCode,
      MMSecDebtInvestWithNPV.FinancialTransaction,

      MMSecDebtInvestWithNPV.SecurityAccount,
      MMSecDebtInvestWithNPV.SecurityClass,
      MMSecDebtInvestWithNPV.SecurityAccountGroup,
      MMSecDebtInvestWithNPV.FinancialInstrProductCategory,
      MMSecDebtInvestWithNPV.FinancialInstrumentProductType,
      MMSecDebtInvestWithNPV.FinancialInstrTransactionType,
      MMSecDebtInvestWithNPV.Counterparty,
      SecurityClass.Issuer,

      case MMSecDebtInvestWithNPV.TreasuryContractType
      when '5' then MMSecDebtInvestWithNPV.TransactionCurrency
      else SecurityClass.IssueCurrency end                                                                                  as TransactionCurrency,

      MMSecDebtInvestWithNPV.DifferentiationPortfolio,
      MMSecDebtInvestWithNPV.TrsyCshFlowDebtInvmtCode,

      MMSecDebtInvestWithNPV.ReferenceInterestRate,
      MMSecDebtInvestWithNPV.FixedVariableInterestRateCat,
      MMSecDebtInvestWithNPV.RiskAnalyzerKeyFigure,
      MMSecDebtInvestWithNPV.HasError,

      MMSecDebtInvestWithNPV.ScaleRatio,

      @Semantics.currencyCode: true
      MMSecDebtInvestWithNPV.NominalCurrency,
      @Semantics.currencyCode: true
      MMSecDebtInvestWithNPV.PositionCurrency,
      @Semantics.currencyCode: true
      MMSecDebtInvestWithNPV.ValuationCurrency,
      @Semantics.currencyCode: true
      MMSecDebtInvestWithNPV.DisplayCurrency,

      @Semantics.amount.currencyCode: 'NominalCurrency'
      @DefaultAggregation: #SUM
      MMSecDebtInvestWithNPV.NominalAmountInNominalCurrency,

      @Semantics.amount.currencyCode: 'PositionCurrency'
      @DefaultAggregation: #SUM
      cast(MMSecDebtInvestWithNPV.BookValueAmtInPositionCurrency * MMSecDebtInvestWithNPV.ScaleRatio as tpm_nominal_amt) as BookValueAmtInPositionCurrency,

      @Semantics.amount.currencyCode: 'ValuationCurrency'
      @DefaultAggregation: #SUM
      cast(MMSecDebtInvestWithNPV.NetPresentValueInValuationCrcy * MMSecDebtInvestWithNPV.ScaleRatio as tv_barwert)         as NetPresentValueInValuationCrcy,

      @Semantics.amount.currencyCode: 'DisplayCurrency'
      @DefaultAggregation: #SUM
      MMSecDebtInvestWithNPV.NominalAmountInReportingCrcy,

      @Semantics.amount.currencyCode: 'DisplayCurrency'
      @DefaultAggregation: #SUM
      cast(MMSecDebtInvestWithNPV.BookValueAmountInReportingCrcy * MMSecDebtInvestWithNPV.ScaleRatio as tpm_nominal_amt) as BookValueAmountInReportingCrcy,

      'T'                                                                                                                   as WITH_RATING, //VERY IMPORTANT!!!!!! this field is used in upper view for join condition!!!

      'F'                                                                                                                   as WITHOUT_RATING, //VERY IMPORTANT!!!!!! this field is used in upper view for join condition!!!


      MMSecDebtInvestWithNPV._NominalCurrency,
      //      MMSecDebtInvestWithNPV._PositionCurrency,

      MMSecDebtInvestWithNPV._DisplayCurrency
}