S_Connections

DDL: S_CONNECTIONS SQL: S_ConnectionsV Type: view Package: SABAP_DEMOS_CDS_FLIGHT

Flight Connections

S_Connections is a CDS View that provides data about "Flight Connections" in SAP S/4HANA. It reads from 1 data source (spfli) and exposes 21 fields with key fields CarrierId, ConnectionId. It has 6 associations to related views. Part of development package SABAP_DEMOS_CDS_FLIGHT.

Data Sources (1)

SourceAliasJoin Type
spfli spfli from

Associations (6)

CardinalityTargetAliasCondition
[1] S_Carrier _Carrier $projection.CarrierId = _Carrier.CarrierId
[*] S_Flights _Flights $projection.CarrierId = _Flights.CarrierId and $projection.ConnectionId = _Flights.ConnectionId
[1] S_Airports _FromAirport $projection.AirportFrom = _FromAirport.AirportId
[1] S_CityAirport _FromCity $projection.AirportFrom = _FromCity.AirportId and $projection.CityFrom = _FromCity.City and $projection.CountryFrom = _FromCity.Country
[1] S_Airports _ToAirport $projection.AirportTo = _ToAirport.AirportId
[1] S_CityAirport _ToCity $projection.AirportTo = _ToCity.AirportId and $projection.CityTo = _ToCity.City and $projection.CountryTo = _ToCity.Country

Annotations (3)

NameValueLevelField
AbapCatalog.sqlViewName S_ConnectionsV view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Flight Connections view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CarrierId carrid Carrier
KEY ConnectionId connid Flight Number
CountryFrom countryfr Departure Country/Region
CityFrom cityfrom Departure City
AirportFrom airpfrom Departure Airport
CountryTo countryto Destination Country/Region
CityTo cityto Destination City
AirportTo airpto Destination Airport
FlightTime fltime Flight time
DepartureTime deptime Departure Time
ArrivalTime arrtime Arrival Time
Distance distance Travel Distance
DistanceUnitId distid Distance in
FlightType fltype Charter
ArrivalsDays period Tax Period
_Carrier _Carrier
_Flights _Flights
_FromAirport _FromAirport
_FromCity _FromCity
_ToAirport _ToAirport
_ToCity _ToCity

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 S_Connections.
-- 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.
-- SQL view name: S_ConnectionsV

CREATE VIEW S_Connections AS
SELECT
  carrid AS CarrierId,
  connid AS ConnectionId,
  countryfr AS CountryFrom,
  CityFrom,
  airpfrom AS AirportFrom,
  CountryTo,
  CityTo,
  airpto AS AirportTo,
  fltime AS FlightTime,
  deptime AS DepartureTime,
  arrtime AS ArrivalTime,
  Distance,
  distid AS DistanceUnitId,
  fltype AS FlightType,
  period AS ArrivalsDays
FROM spfli
LEFT OUTER JOIN S_Carrier AS _Carrier ON CarrierId = _Carrier.CarrierId  -- association [1]
LEFT OUTER JOIN S_Flights AS _Flights ON CarrierId = _Flights.CarrierId AND ConnectionId = _Flights.ConnectionId  -- association [*]
LEFT OUTER JOIN S_Airports AS _FromAirport ON AirportFrom = _FromAirport.AirportId  -- association [1]
LEFT OUTER JOIN S_CityAirport AS _FromCity ON AirportFrom = _FromCity.AirportId AND CityFrom = _FromCity.City AND CountryFrom = _FromCity.Country  -- association [1]
LEFT OUTER JOIN S_Airports AS _ToAirport ON AirportTo = _ToAirport.AirportId  -- association [1]
LEFT OUTER JOIN S_CityAirport AS _ToCity ON AirportTo = _ToCity.AirportId AND CityTo = _ToCity.City AND CountryTo = _ToCity.Country  -- association [1]
;