Professional Documents
Culture Documents
CDS View Association Part-4
CDS View Association Part-4
sqlViewName: 'ZSFLIGHTVIEW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight CDS View with Association'
@VDM.viewType: #BASIC
view Zflight_View //with //parameters p_displaycurrency : displaycurrency
as select from sflight[currency <> ''] as sflight //fILTER vALUE aSSIGNED
association[1..1] to spfli as _spfli
on sflight .carrid = _spfli.carrid and sflight.connid = _spfli.connid
// on $projection.carrid = _spfli.carrid AND $projection.connid = _spfli.connid
{
key sflight.carrid ,
key sflight.connid ,
key sflight.fldate ,
// spfli.distance as DISTANCE,
sflight.price as Airfare,
sflight.currency as FareCurrency,
sflight.planetype as PlaneCategory,
sflight.seatsmax as MaxAvailableSeats,
sflight.seatsocc as OccupiedSeats ,
/* Associations */
// _spfli.countryfr as COUNTRYFR,
//-spfli.countryto as COUNTRYTO
_spfli