@AbapCatalog.sqlViewName: 'IBSECUBE'
@AbapCatalog.compiler.compareFilter: true
@Analytics: { dataCategory: #CUBE, dataExtraction.enabled: true }
@VDM.viewType: #COMPOSITE
// Authorization Check not required in CDS View because it just expose constant values
// real access is by readerClass in Analytical Engine that need to provide authorizaton check
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.authCheck:#PRIVILEGED_ONLY
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #D
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Analytics.readClassName: 'CL_FXM_BSE_QUERY_ADAPTER'
@EndUserText.label: 'Balance Sheet Exposure'
define view I_BalanceSheetExposure
as select from I_Currency
association [0..1] to I_BalSheetExpsrKeyFigure as _BalSheetExpsrKeyFigure on $projection.BalSheetExpsrKeyFigure = _BalSheetExpsrKeyFigure.BalSheetExpsrKeyFigure
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_Currency as _DisplayCurrency on $projection.DisplayCurrency = _DisplayCurrency.Currency
association [0..1] to I_Currency as _TransactionCurrency on $projection.TransactionCurrency = _TransactionCurrency.Currency
association [0..1] to I_ExchangeRateType as _ExchangeRateType on $projection.ExchangeRateType = _ExchangeRateType.ExchangeRateType
association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYear
and $projection.CompanyCode = _FiscalYear.CompanyCode
association [0..1] to I_AccountingDocumentType as _AccountingDocumentType on $projection.AccountingDocumentType = _AccountingDocumentType.AccountingDocumentType
{
@EndUserText.label: 'Exposure or Hedge'
cast('E' as fxm_exposure_hedge_indicator preserving type) as ExposureHedgeCode,
@EndUserText.label: 'Exposure or Hedge Text'
cast('Exposure' as fxm_exposure_hedge_ind_txt) as ExposureHedgeCodeName,
@ObjectModel.foreignKey.association: '_BalSheetExpsrKeyFigure'
cast('KEY1' as fxm_keyfigure_id) as BalSheetExpsrKeyFigure,
cast('KEY1' as fxm_keyfigure_txt) as BalSheetExpsrKeyFigName,
cast('GR1' as fxm_keyfigure_group_id) as BalShtExpsrKeyFigGrp,
cast('GR1' as fxm_keyfigure_group_txt) as BalShtExpsrKeyFigGrpName,
@ObjectModel.foreignKey.association: '_CompanyCode'
cast('0001' as bukrs) as CompanyCode,
cast('123' as vvsart) as FinancialInstrumentProductType,
@Consumption.semanticObject: 'GLAccount'
cast('123' as fis_racct) as GLAccount,
@ObjectModel.foreignKey.association: '_ExchangeRateType'
cast('M' as kurst) as ExchangeRateType,
cast('20160101' as fxm_keydate) as KeyDate,
cast('xxxxxx' as fqm_certainty_level) as CertaintyLevel,
cast('xxxxxxxxxx' as fdgrp) as CashPlanningGroup,
cast('xxxxxxxxxxxxxxxx' as flqpos) as LiquidityItem,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'TransactionCurrency'
cast(0 as ftr_gen_amount_trans_crcy ) as AmountInTransactionCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as farp_amount_display_crcy) as AmountInDisplayCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as fxm_exposure_amount) as ExpAmtInDC,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as fxm_hedge_amount) as HedgeAmtInDC,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as fxm_abs_net_exposure) as AbsNetExpAmtInDC,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as fxm_abs_exposure) as AbsExposureAmountInDC,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'DisplayCurrency'
cast(0 as fxm_abs_hedge) as AbsHedgeAmtInDC,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_DisplayCurrency'
cast('JPY' as displaycurrency) as DisplayCurrency,
@Semantics.currencyCode: true
cast('EUR' as ftr_gen_trans_currency) as TransactionCurrency,
cast('0L' as fis_rldnr) as Ledger,
@ObjectModel.foreignKey.association: '_FiscalYear'
cast('1999' as gjahr) as FiscalYear,
cast('999' as poper) as PostingPeriod,
cast('20160101' as fis_bldat) as DocumentDate,
cast('20160101' as fis_budat) as PostingDate,
@ObjectModel.foreignKey.association: '_AccountingDocumentType'
cast('XX' as farp_blart) as AccountingDocumentType,
cast('XXXX' as fis_ktopl) as ChartOfAccounts,
cast('X' as fis_koart) as FinancialAccountType,
cast('XX' as fdlev) as PlanningLevel,
cast('X' as tb_rfha) as FinancialTransaction,
cast('X' as rantyp) as TreasuryContractType,
cast('X' as tb_sfhaart) as FinancialTransactionType,
cast('X' as tb_rfhazu) as FinancialInstrumentActivity,
cast('X' as rkontrah_new) as Counterparty,
cast('X' as rportb) as Portfolio,
cast('X' as tb_tfproj) as TreasuryFinanceProject,
cast('X' as tb_delfz) as TermEndDate,
cast('X' as ftr_gen_fin_instr_assignment) as FinancialInstrumentAssignment,
cast('X' as tb_sfgzuty) as FinancialInstrActivityCategory,
cast('X' as tb_nordext) as FinInstrExternalReference,
cast('X' as tb_ssign) as TreasuryPaymentFlowDirection,
/* Annotations */
_BalSheetExpsrKeyFigure,
_CompanyCode,
_DisplayCurrency,
_TransactionCurrency,
_ExchangeRateType,
_FiscalYear,
_AccountingDocumentType
}
where
Currency = 'XXX'
and Currency <> 'XXX'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CURRENCY"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_BALSHEETEXPSRKEYFIGURE",
"I_COMPANYCODE",
"I_CURRENCY",
"I_EXCHANGERATETYPE",
"I_FISCALYEARFORCOMPANYCODE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/