DEMO_CDS_FLIGHTS

DDL: DEMO_CDS_FLIGHTS Type: view_entity

DEMO_CDS_FLIGHTS is a CDS View in SAP S/4HANA. It reads from 1 data source (spfli) and exposes 11 fields with key fields id, carrier, flight.

Data Sources (1)

SourceAliasJoin Type
spfli spfli from

Annotations (1)

NameValueLevelField
AccessControl.authorizationCheck #NOT_ALLOWED view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY id spfli carrid Carrier
KEY carrier scarr carrname Carrier
KEY flight spfli connid Flight Number
departure spfli cityfrom Departure City
from_country spfli countryfr Departure Country/Region
destination spfli cityto Destination City
to_country spfli countryto Destination Country/Region
flight_time spfli fltime Flight time
flight_date sflight fldate Flight Date
plane_type sflight planetype Planetype
free_seats

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view DEMO_CDS_FLIGHTS.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW DEMO_CDS_FLIGHTS AS
SELECT
  spfli.carrid AS id,
  scarr.carrname AS carrier,
  spfli.connid AS flight,
  spfli.cityfrom AS departure,
  spfli.countryfr AS from_country,
  spfli.cityto AS destination,
  spfli.countryto AS to_country,
  spfli.fltime AS flight_time,
  sflight.fldate AS flight_date,
  sflight.planetype AS plane_type,
  sum( sflight.seatsmax - sflight.seatsocc ) AS free_seats
FROM spfli
;