SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Reference

SAP-samples/cap-sflight

A travel-booking reference application built with CAP and SAP Fiori elements, whose same UIs run against a Node.js and a Java backend so the two stacks can be compared directly.

The same travel-processing and analytics UIs run against either a CAP Node.js backend or a CAP Java SDK backend, letting the two stacks be compared directly rather than read about separately. It demonstrates SAP Fiori annotations and runs UI test suites across the stacks, including an Analytical List Page built on an experimental new OData parser in the Node.js runtime. It stops short of masking the app's own rough edges: the README notes workarounds still in the model and handlers, and a travel total that simply sums prices while ignoring currencies.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Fiori annotationsCAPFiori annotationscapabilityDescribing a service so a Fiori client can render it without hand-written UI code — titles, value helps, hierarchies and visibility expressed as model annotations rather than screen logic.Reference appsCAPReference appscapabilityA whole application to read rather than a snippet to copy — somewhere to see how the pieces sit together once there are more than three of them.

Who is behind it

SAP SamplesSAP SamplesOrganisationMaintains this
In the atlas: maintains 222
@SAP-samples
maintainerAdrian GörlerPersonContributes to this
In the atlas: contributes to 4
@agoerler
Ajinkya PatilPersonContributes to this
In the atlas: contributes to 112
@ajinkyapatil8190
Johannes VogtPersonContributes to this
In the atlas: maintains 1, contributes to 28, wrote 10
@Akatuoro
Marc BeckerPersonContributes to this
In the atlas: contributes to 7
@beckermarc
Bob den OsPersonContributes to this
In the atlas: contributes to 13
@BobdenOs
Brian BernardPersonContributes to this
In the atlas: contributes to 64
@btbernard
Andre MeyeringPersonContributes to this
In the atlas: contributes to 10
@bugwelle
Christian KolbowskiPersonContributes to this
In the atlas: contributes to 3
@c-kobo
Christian GeorgiPersonContributes to this
In the atlas: maintains 1, contributes to 53
@chgeo
Daniel HutzelPersonContributes to this
In the atlas: contributes to 32, wrote 3
@danjoa
41 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP
Use as
A reference

As a sample

Form
A reference application

Connections2

SAP-samples/cap-sflight connectionsSAP-samples/cap-sflightPROVIDES→ demonstrates2demonstrates authoredFiori annotationsdemonstrates authoredReference apps

ArchitectureBetaRead from the sample's deployment descriptor. Some of the connections it states are not drawn yet.

as mta.yaml states it at f51f831, read
SAP BTP, Cloud Foundry Runtimecapire.sflightmta.yaml, module sflight-srv, requires sflight-uaabinding, HTTP, outboundSAP Authorization and Trust Management service, xsuaa, applicationSAP Authorizationand TrustManagement servicesflight-srv, nodejssflight-srvsflight-db-deployer, hdbsflight-db-deployersflight-appcontent, com.sap.application.contentsflight-appcontentsflight-app-travel-processor, html5sflight-app-travel-p…sflight-app-travel-analytics, html5sflight-app-travel-a…sflight-destinationcontent, com.sap.application.contentsflight-destinationc…hana, hana, hdi-sharedhanaSAP HTML5 Application Repository service for SAP BTP, html5-apps-repo, app-runtimeSAP HTML5ApplicationRepository servicefor SAP BTPSAP HTML5 Application Repository service for SAP BTP, html5-apps-repo, app-hostSAP HTML5ApplicationRepository servicefor SAP BTPSAP Destination service, destination, liteSAP Destinationservice
SAPnot SAP's, or the project's ownauthenticationstated in the document

Bound, and not drawn

Documented, with no instance in the document

Bound in the descriptor, not joined to an entry

hana

README

quoted from SAP-samples/cap-sflight under Apache-2.0, read
SAP-samples/cap-sflight/README.mdOn GitHub

Welcome to the CAP SFLIGHT App

This is a sample app for the travel reference scenario, built with the SAP Cloud Application Programming Model (CAP) and SAP Fiori Elements.

The purpose of this sample app is to:

  • Demonstrate SAP Fiori annotations
  • Demonstrate and compare SAP Fiori features on various stacks (CAP Node.js, CAP Java SDK, ABAP)
  • Run UI test suites on various stacks

Process Travels Page

The app still contains some workarounds that are going to be addressed over time. In some cases, the model and the handlers can be improved or simplified once further planned CAP features become available. In other cases, the app itself could be improved. For example, calculation of the total price for a travel currently simply sums up the single prices ignoring the currencies.

For enabling all features of the Analytical List Page (ALP) in the Node.js runtime, we have switched on the new OData parser (odata_new_parser: true in package.json), which is still in an experimental state. Early adopters may use this feature in own projects on their own risk. You can also use the ALP with the standard OData parser, but then some features like grouping in the table are not available.

REUSE status

Run locally

Build and Run - Node.js Backend

Prerequisite:

npm i -g @sap/cds-dk

In the root folder of your project, run

npm ci
cds watch
Accessing the SAP Fiori Apps

Open these links in your browser:

Build and Run - Java Backend

In the root folder of your project, run

npm ci
npm run build:ui
mvn spring-boot:run

At the moment, there is no watch mode for Fiori UI changes. Run npm run build:ui after each change there.

Accessing the SAP Fiori Apps

Open these links in your browser:

Log in with user amy and empty password.

Integration Tests

To start OPA tests, open this link in your browser: http://localhost:4004/travel_processor/webapp/test/integration/Opa.qunit.html

Test documentation is available at: https://ui5.sap.com/#/api/sap.fe.test

Deployment to SAP Business Technology Platform

The project contains a configuration for deploying the CAP services and the SAP Fiori app to the SAP Business Technology Platform (SAP BTP) using a managed application router. The app then becomes visible in the content manager of the SAP Build Work Zone.

The configuration file mta.yaml is for the Node.js backend of the app. If you want to deploy the Java backend, copy mta-java.yaml to mta.yaml.

Prerequisites
SAP Business Technology Platform
Local Machine
  • Install the Cloud Foundry command line interface (CLI). See this tutorial for more details.

  • Install the MultiApps CF CLI Plugin:

    cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
    cf install-plugin multiapps
  • Install the Cloud MTA Build Tool globally:

    npm install -g mbt
Build the Project

Build the project from the command line:

mbt build

The build results will be stored in the directory mta_archives.

Deploy
  1. Log in to the target space.
  2. Deploy the MTA archive using the CF CLI: cf deploy mta_archives/capire.sflight_1.0.0.mtar
Assign Role Collection

Any authorized user has read access to the app. For further authorization, assign a role collection to your user in the SAP BTP Cockpit:

  • sflight-reviewer-{spacename} for executing actions Accept Travel, Reject Travel, and Deduct Discount
  • sflight-processor-{spacename} for full write access
Integrate SFlight with SAP Build Work Zone, Standard Edition

CAP SFlight uses the managed AppRouter, which in case of a trial account, is provided by the Navigation Service in SAP Build Work Zone, Standard Edition. Please consult this tutorial to make sure that your Build Work Zone is configured correctly to serve the CAP SFlight Frontend.

Local Development with a HANA Cloud Instance

You need to have access to a HANA Cloud instance and SAP BTP.

  1. Deploy the HDI content to a HANA HDI container (which is newly created on first call): cds deploy --to hana.
  2. Start the application with the Spring Profile cloud.
    1. From Maven: mvn spring-boot:run -Dspring-boot.run.profiles=cloud
    2. From your IDE with the JVM argument -Dspring.profiles.active=cloud or env variable spring.profiles.active=cloud

The running application is now connected to its own HDI container/schema. Please keep in mind that the credentials for that HDI container are stored locally on your filesystem (default-env.json).

Deployment to SAP Business Technology Platform - Kyma Runtime

The deployment to Kyma Runtime is explained in file README-Kyma.md.

Creating an SAP Fiori App from Scratch

If you want to implement an SAP Fiori app, follow these tutorials:

Get Support

In case you've a question, find a bug, or otherwise need support, use the SAP Community to get more visibility.

License

Copyright (c) 2021 SAP SE or an SAP affiliate company and cap-sflight contributors. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Apache-2.0, read

Details

Sources3
Added by handdiscovered herechecked
github.com/SAP-samples/cap-sflighttree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, ui-and-frontend-bridge
Flavors2
Node.js
“Build and Run - Node.js Backend” — SAP-samples/cap-sflight — READMEchecked
Java
“Build and Run - Java Backend” — SAP-samples/cap-sflight — READMEchecked
Contributors41
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sap-samples-cap-sflight
JSON
/artifacts/sap-samples-cap-sflight.json
MCP
Connecting an agent