CdsFrwk_Spcl_Functions
cds having currency and unit conversion
CdsFrwk_Spcl_Functions is a CDS View that provides data about "cds having currency and unit conversion" in SAP S/4HANA. It reads from 2 data sources (sflight, spfli) and exposes 2 fields.
Parameters (1)
| Name | Type | Default |
|---|---|---|
| to_currency | abap.cuky( 5 ) |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CdsFrwk_DEMO_13 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | cds having currency and unit conversion | view |
@AbapCatalog.sqlViewName: 'CdsFrwk_DEMO_13'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'cds having currency and unit conversion'
define view CdsFrwk_Spcl_Functions
with parameters
to_currency : abap.cuky( 5 )
as select from sflight
inner join spfli on sflight.carrid = spfli.carrid
{
sflight.price as amount,
spfli.distance as distance,
currency_conversion(
amount => price,
source_currency => currency,
target_currency => :to_currency,
exchange_rate_date => fldate
) as cnv_amount_1,
currency_conversion(
amount => price,
source_currency => :to_currency,
target_currency => cast( 'USD' as abap.cuky( 5 )),
exchange_rate_date => fldate,
decimal_shift => 'X',
error_handling => 'SET_TO_NULL'
) as cnv_amount_2,
unit_conversion(
quantity => spfli.distance,
source_unit => spfli.distid,
target_unit => cast( 'KM' as abap.unit( 3 ))
) as cnv_distance
}
where spfli.distid = 'MI'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"SFLIGHT",
"SPFLI"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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