R_CurrencyExchangeRate
Currency Exchange Rates
R_CurrencyExchangeRate is a Composite CDS View that provides data about "Currency Exchange Rates" in SAP S/4HANA. It reads from 2 data sources (P_CurrencyExchangeRate, P_CurrencyExchangeRate) and exposes 37 fields with key fields ExchangeRateType, SourceCurrency, TargetCurrency, ExchangeRateEffectiveDate, SourceCurrency. It has 2 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_CurrencyExchangeRate | P_CurrencyExchangeRate | from |
| P_CurrencyExchangeRate | P_CurrencyExchangeRate | union_all |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CurrencyText | _SourceCurrencyText | $projection.SourceCurrency = _SourceCurrencyText.Currency and _SourceCurrencyText.Language = $session.system_language |
| [0..1] | I_CurrencyText | _TargetCurrencyText | $projection.TargetCurrency = _TargetCurrencyText.Currency and _TargetCurrencyText.Language = $session.system_language |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | RCRCYEXCHRATE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| EndUserText.label | Currency Exchange Rates | view |
Fields (37)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ExchangeRateType | ExchangeRateType | Exch. Rate Type | |
| KEY | SourceCurrency | SourceCurrency | From currency | |
| KEY | TargetCurrency | TargetCurrency | Trans. Currency | |
| KEY | ExchangeRateEffectiveDate | |||
| CrcyExchangeRateValidOnDate | ExchangeRateEffectiveDate | |||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| NumberOfSourceCurrencyUnits | NumberOfSourceCurrencyUnits | Ratio (from) | ||
| NumberOfTargetCurrencyUnits | NumberOfTargetCurrencyUnits | Ratio (to) | ||
| StatisticsExchRateIsIndrctQtan | ExchRateIsIndirectQuotation | Exchange Rate Is Indirect Quotation | ||
| ExchRateIsIndirectQuotation | ||||
| ExchangeRateQuotation | ||||
| AbsoluteExchangeRate | AbsoluteExchangeRate | Absolute Exchange Rate | ||
| EffectiveExchangeRate | ||||
| DirectQuotedEffectiveExchRate | DirectQuotedEffectiveExchRate | |||
| IndirectQuotedEffctvExchRate | ||||
| StatisticsExchangeRate | ||||
| CurrencyPair | ||||
| CurrencyPairText | ||||
| system_languagekeyExchangeRateType | Ratio (from) | |||
| KEY | SourceCurrency | SourceCurrency | From currency | |
| KEY | TargetCurrency | TargetCurrency | Trans. Currency | |
| KEY | ExchangeRateEffectiveDate | |||
| CrcyExchangeRateValidOnDate | ExchangeRateEffectiveDate | |||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| NumberOfSourceCurrencyUnits | NumberOfSourceCurrencyUnits | Ratio (from) | ||
| NumberOfTargetCurrencyUnits | NumberOfTargetCurrencyUnits | Ratio (to) | ||
| StatisticsExchRateIsIndrctQtan | ExchRateIsIndirectQuotation | Exchange Rate Is Indirect Quotation | ||
| ExchRateIsIndirectQuotation | ||||
| ExchangeRateQuotation | ||||
| AbsoluteExchangeRate | AbsoluteExchangeRate | Absolute Exchange Rate | ||
| EffectiveExchangeRate | ||||
| DirectQuotedEffectiveExchRate | DirectQuotedEffectiveExchRate | |||
| IndirectQuotedEffctvExchRate | ||||
| StatisticsExchangeRate | ||||
| CurrencyPair | ||||
| CurrencyPairText | ||||
| ExchangeRateRatioValue | Ratio (from) |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view R_CurrencyExchangeRate.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: RCRCYEXCHRATE
CREATE VIEW R_CurrencyExchangeRate AS
SELECT
ExchangeRateType,
SourceCurrency,
TargetCurrency,
cast(ExchangeRateEffectiveDate as exchangerateeffectivedate) AS ExchangeRateEffectiveDate,
ExchangeRateEffectiveDate AS CrcyExchangeRateValidOnDate,
ExchangeRate,
NumberOfSourceCurrencyUnits,
NumberOfTargetCurrencyUnits,
ExchRateIsIndirectQuotation AS StatisticsExchRateIsIndrctQtan,
cast('I' as exchangeratequotation) AS ExchRateIsIndirectQuotation,
cast('I' as exchangeratequotation) AS ExchangeRateQuotation,
AbsoluteExchangeRate,
cast(0 as fis_effective_exchangerate) AS EffectiveExchangeRate,
DirectQuotedEffectiveExchRate,
-IndirectQuotedEffctvExchRate AS IndirectQuotedEffctvExchRate,
cast(division ( ( abs(IndirectQuotedEffctvExchRate) * NumberOfSourceCurrencyUnits ) , NumberOfTargetCurrencyUnits, 5 ) as fis_effective_exchangerate) AS StatisticsExchangeRate,
cast(concat( concat(TargetCurrency, '/'), SourceCurrency) as ftr_curr_pair) AS CurrencyPair,
cast(concat( concat(_TargetCurrencyText.CurrencyName, '/'), _SourceCurrencyText.CurrencyName) as currencypairtext) AS CurrencyPairText,
cast(concat_with_space( concat(cast(NumberOfSourceCurrencyUnits as abap.char(11)), ' :'), cast(NumberOfTargetCurrencyUnits as abap.char(11)),1) as exchangerateratio) as ExchangeRateRatioValue AS system_languagekeyExchangeRateType,
cast(concat_with_space( concat(cast(NumberOfSourceCurrencyUnits as abap.char(11)), ' :'), cast(NumberOfTargetCurrencyUnits as abap.char(11)),1) as exchangerateratio) AS ExchangeRateRatioValue
FROM P_CurrencyExchangeRate
LEFT OUTER JOIN I_CurrencyText AS _SourceCurrencyText ON SourceCurrency = _SourceCurrencyText.Currency AND _SourceCurrencyText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_CurrencyText AS _TargetCurrencyText ON TargetCurrency = _TargetCurrencyText.Currency AND _TargetCurrencyText.Language = $session.system_language -- association [0..1]
-- UNION ALL with additional select branch(es): P_CurrencyExchangeRate
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA