You are on page 1of 1

@AbapCatalog.

sqlViewName: 'ZSFLIGHTVIEW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight CDS View with parameter'
@VDM.viewType: #BASIC
view Zflight_View as select from sflight inner join //join
//inner Join
spfli on spfli.carrid = sflight.carrid and spfli.connid = sflight.connid
{
key sflight.carrid as AirlineCode,
key sflight.connid as ConnectionNumber,
key sflight.fldate as FlightDate,

case when price > 1000.00 then 'PRICE HIGH'


when price >= 899.00 and price < 1000.00 then 'PRICE MEDIUM'
when price >= 400.00 and price < 899.00 then 'PRICE NORMAL'
else 'GOOD' end as jOURNY_TYPE,
spfli.distance as DISTANCE,
sflight.price as Airfare,
sflight.currency as FareCurrency,
sflight.planetype as PlaneCategory,
sflight.seatsmax as MaxAvailableSeats,
sflight.seatsocc as OccupiedSeats ,
spfli.countryfr as COUNTRYFR,
spfli.countryto as COUNTRYTO

You might also like