Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

@AbapCatalog.

sqlViewName: ‘sql_view_name’
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: ‘Flight CDS View with parameter’
define view Zflight_Param_View as select from data_source_name {
}

Provide the code, declare an input parameter as ‘flight_code’ with data element type ‘s_carr_id’ and
make use of that in the where condition.

@AbapCatalog.sqlViewName: ‘ZSFLIGHTPARVIEW’
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: ‘Flight CDS View with parameter’
@VDM.viewType: #BASIC
define view Zflight_Param_View
with parameters flight_code: s_carr_id
as select from sflight{
key sflight.carrid as AirlineCode,
key sflight.connid as ConnectionNumber,
key sflight.fldate as FlightDate,
sflight.price as Airfare,
sflight.currency as FareCurrency,
sflight.planetype as PlaneCategory,
sflight.seatsmax as MaxAvailableSeats,
sflight.seatsocc as OccupiedSeats
} where carrid = $parameters.flight_code

Activate the cds view. After activation, ddl sql view is created.

In the selection condition, we can see the input condition.

You might also like