Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
402 views1 page

CDS View With Association (1..1) and Use of Path Expression

This document defines a CDS view named Zflight_View that selects data from the sflight table and associates it with data from the spfli table to return additional related fields. The view defines the key fields to join on, fields to select from each table, and includes the associated spfli record in the result.

Uploaded by

bipin012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views1 page

CDS View With Association (1..1) and Use of Path Expression

This document defines a CDS view named Zflight_View that selects data from the sflight table and associates it with data from the spfli table to return additional related fields. The view defines the key fields to join on, fields to select from each table, and includes the associated spfli record in the result.

Uploaded by

bipin012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

@AbapCatalog.

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
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

You might also like