15 lines
729 B
Plaintext
15 lines
729 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Wind turbine revenue'
|
|
define view entity {{P}}I_TURBINE
|
|
as select from {{p}}turbine as turbine
|
|
left outer join {{p}}wpark as park on park.park_id = turbine.park_id
|
|
association [0..1] to {{p}}wpark as _PARK on $projection.park_id = _PARK.park_id
|
|
{
|
|
key turbine.turbine_id as turbine_id,
|
|
turbine.park_id as park_id,
|
|
turbine.nominal_kw as nominal_kw,
|
|
turbine.yield_mwh as yield_mwh,
|
|
cast( turbine.yield_mwh * park.tariff as abap.dec(15,2) ) as revenue,
|
|
_PARK
|
|
}
|