CDS标准视图:催款级别分配 I_DunningLevelDistribution
视图名称:催款级别分配 I_DunningLevelDistribution
视图类型:参数视图
视图代码:
点击查看代码
@AbapCatalog.sqlViewName: 'IFIDUNLVLDISTR'
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Dunning Level Distribution'
@Analytics: { dataCategory: #CUBE }
@Analytics.internalName: #LOCAL // released with Cloud 1808 and OP 1809 hence no design studio usage before
@Search.searchable: false // I_Region is annotated as true, hence this new must have an annotation for searchable
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions:true
@AccessControl.authorizationCheck:#CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER, #CDS_MODELING_DATA_SOURCE ]
@AccessControl.personalData.blocking: #REQUIRED
define view I_DunningLevelDistribution
with parameters
@Environment.systemField: #SYSTEM_DATE
P_TodayDate : sydate,
P_LowerBoundaryDunningLevel : far_lower_bndry_dunning_level,
P_UpperBoundaryDunningLevel : far_upper_bndry_dunning_level,
P_DisplayCurrency : vdm_v_display_currency,
P_ExchangeRateType : kurst
as select from P_DunningLevelDistribution(P_LowerBoundaryDunningLevel: :P_LowerBoundaryDunningLevel,
P_UpperBoundaryDunningLevel: :P_UpperBoundaryDunningLevel)
association [0..1] to I_CompanyCode as _Company on _Company.CompanyCode = $projection.CompanyCode
association [0..1] to I_Customer as _Customer on _Customer.Customer = $projection.Customer
association [0..1] to I_CustomerCompany as _CustomerCompany on _CustomerCompany.CompanyCode = $projection.CompanyCode
and _CustomerCompany.Customer = $projection.Customer
association [0..1] to I_AccountingClerk as _AccountingClerk on _AccountingClerk.CompanyCode = $projection.CompanyCode
and _AccountingClerk.AccountingClerk = $projection.AccountingClerk
association [0..1] to I_Country as _CustomerCountry on _CustomerCountry.Country = $projection.CustomerCountry
association [0..1] to I_Region as _CustomerRegion on _CustomerRegion.Region = $projection.CustomerRegion
and _CustomerRegion.Country = $projection.CustomerCountry
association [0..1] to I_ChartOfAccounts as _ChartOfAccounts on _ChartOfAccounts.ChartOfAccounts = $projection.ChartOfAccounts
association [0..1] to I_GLAccountInChartOfAccounts as _ReconciliationAccount on _ReconciliationAccount.ChartOfAccounts = $projection.ChartOfAccounts
and _ReconciliationAccount.GLAccount = $projection.ReconciliationAccount
association [0..1] to I_Currency as _DisplayCurrency on _DisplayCurrency.Currency = $projection.DisplayCurrency
association [0..1] to I_Currency as _CompanyCodeCurrency on _CompanyCodeCurrency.Currency = $projection.CompanyCodeCurrency
association [0..1] to I_CustomerAccountGroup as _CustomerAccountGroup on _CustomerAccountGroup.CustomerAccountGroup = $projection.CustomerAccountGroup
association [0..1] to I_CustomerClassification as _CustomerClassification on _CustomerClassification.CustomerClassification = $projection.CustomerClassification
// associations are declared here in sum for better overview; in runtime the joins are exceuted on appropriate level
// Foreign Key Associations declare the dimension cube (I-View) from which the property values are derived of by Analytical Engine (see report RSRTS_ODP_DIS)
{
@ObjectModel.foreignKey.association: '_Company'
key CompanyCode,
@ObjectModel.foreignKey.association: '_Customer'
key Customer,
key DunningLevel,
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
CompanyCodeCurrency,
cast(:P_ExchangeRateType as kurst) as ExchangeRateType,
@ObjectModel.foreignKey.association: '_CustomerCountry'
cast( _Customer._StandardAddress._Country.Country as farp_land1 ) as CustomerCountry,
@ObjectModel.foreignKey.association: '_CustomerRegion'
_Customer._StandardAddress._Region.Region as CustomerRegion,
@ObjectModel.foreignKey.association: '_AccountingClerk'
cast( _CustomerCompany.AccountingClerk as farp_busab ) as AccountingClerk,
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
cast( _Company.ChartOfAccounts as fis_ktopl ) as ChartOfAccounts,
@ObjectModel.foreignKey.association: '_ReconciliationAccount'
cast( _CustomerCompany.ReconciliationAccount as farp_akont ) as ReconciliationAccount,
// fields for authorization checks via DCL
cast( _Customer.AuthorizationGroup as fis_customer_basic_auth_grp ) as CustomerBasicAuthorizationGrp,
_CustomerCompany.AuthorizationGroup as CustomerFinsAuthorizationGrp,
@ObjectModel.foreignKey.association: '_CustomerAccountGroup'
_Customer.CustomerAccountGroup as CustomerAccountGroup,
@ObjectModel.foreignKey.association: '_CustomerClassification'
_Customer.CustomerClassification as CustomerClassification,
@Semantics.currencyCode:true
@ObjectModel.foreignKey.association: '_DisplayCurrency'
cast(:P_DisplayCurrency as vdm_v_display_currency) as DisplayCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel1AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount1_dsp_crcy ) as DunningLevel1AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel2AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount2_dsp_crcy ) as DunningLevel2AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel3AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount3_dsp_crcy ) as DunningLevel3AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel4AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount4_dsp_crcy ) as DunningLevel4AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel5AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount5_dsp_crcy ) as DunningLevel5AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel6AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount6_dsp_crcy ) as DunningLevel6AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel7AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount7_dsp_crcy ) as DunningLevel7AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel8AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount8_dsp_crcy ) as DunningLevel8AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunningLevel9AmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_amount9_dsp_crcy ) as DunningLevel9AmtInDspCrcy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast( currency_conversion(
amount => DunLevelRngeAmtInCoCodeCrcy,
source_currency => CompanyCodeCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => :P_TodayDate,
exchange_rate_type => :P_ExchangeRateType,
// error_handling => #CNV_ERROR_HANDLING.FAIL_ON_ERROR,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as far_dun_lvl_rnge_amt_dsp_crcy ) as DunningLevelRngeAmtInDspCrcy,
_Company,
_Customer,
_CustomerCompany,
_AccountingClerk,
_CustomerCountry,
_CustomerRegion,
_ReconciliationAccount,
_ChartOfAccounts,
_DisplayCurrency,
_CompanyCodeCurrency,
_CustomerClassification,
_CustomerAccountGroup
}
事务代码:参数
起始催款级:最低的催款级别
截止催款级:最高的催款级别
汇率类型:汇款类型
CDATE:用于输入当期日期
显示货币:显示的货币类型
视图结构:
| 字段名称 | 技术名称 |
|---|---|
| 公司代码 | COMPANYCODE |
| 客户 | CUSTOMER |
| 催款级别 | DUNNINGLEVEL |
| 公司代码货币 | COMPANYCODECURRENCY |
| 汇率类型 | EXCHANGERATETYPE |
| 国家/地区代码 | CUSTOMERCOUNTRY |
| 地区 | CUSTOMERREGION |
| 会计员 | ACCOUNTINGCLERK |
| 科目表 | CHARTOFACCOUNTS |
| 对账科目 | RECONCILIATIONACCOUNT |
| 客户基本权限组 | CUSTOMERBASICAUTHORIZATIONGRP |
| 权限 | CUSTOMERFINSAUTHORIZATIONGRP |
| 客户科目组 | CUSTOMERACCOUNTGROUP |
| 客户分类 | CUSTOMERCLASSIFICATION |
| 显示货币 | DISPLAYCURRENCY |
| 催款金额级别 1 | DUNNINGLEVEL1AMTINDSPCRCY |
| 催款金额级别 2 | DUNNINGLEVEL2AMTINDSPCRCY |
| 催款金额级别 3 | DUNNINGLEVEL3AMTINDSPCRCY |
| 催款金额级别 4 | DUNNINGLEVEL4AMTINDSPCRCY |
| 催款金额级别 5 | DUNNINGLEVEL5AMTINDSPCRCY |
| 催款金额级别 6 | DUNNINGLEVEL6AMTINDSPCRCY |
| 催款金额级别 7 | DUNNINGLEVEL7AMTINDSPCRCY |
| 催款金额级别 8 | DUNNINGLEVEL8AMTINDSPCRCY |
| 催款金额级别 9 | DUNNINGLEVEL9AMTINDSPCRCY |
| 催款级别范围金额 | DUNNINGLEVELRNGEAMTINDSPCRCY |

本文来自博客园,作者:观兴,转载请注明原文链接:https://www.cnblogs.com/guanxing/p/18662508

浙公网安备 33010602011771号