Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Numeric Functions in ABAP CDS

Download as txt, pdf, or txt
Download as txt, pdf, or txt
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 //with parameters p_displaycurrency : displaycurrency
as select from sflight inner join //inner Join
spfli on sflight.carrid = spfli.carrid and spfli.connid = sflight.connid
{
key sflight.carrid ,
key sflight.connid ,
key sflight.fldate ,
spfli.distance as DISTANCE,
sflight.price as Airfare,
/*Ceil and Floor*/
ceil(sflight.price) as Ceil,
floor(sflight.price) as Floor,
/*Division*/
div( spfli.distance , sflight.price ) as Div_Op,
division(sflight.seatsocc ,sflight.seatsmax, 3) as Div_Op2,
/*mod*/
MOD(sflight.seatsmax,sflight.seatsocc ) as MOD,
/*Round*/
ROUND(sflight.price,1 ) as round,
/*ABS*/
abs(-2) as Abs,

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