All Projects → SAP-samples → cap-sflight

SAP-samples / cap-sflight

Licence: other
Using SAP Cloud Application Programming Model and SAP Fiori elements to build a simple travel management app, both with Node.js and Java.

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
HTML
75241 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cap-sflight

fiori-elements-feature-showcase
Sample application that demonstrates and documents a broad variety of features of SAP Fiori elements for OData V4. Developers can play around with the new features and learn how to implement them.
Stars: ✭ 76 (+16.92%)
Mutual labels:  sample, sample-code, sap-fiori, sap-cap, sap-fiori-elements
ui5-cap-event-app
Showcase of SAP Cloud Application Programming Model and OData V4 with draft mode in a freestyle SAPUI5 app and an SAP Fiori elements app.
Stars: ✭ 70 (+7.69%)
Mutual labels:  sample, sample-code, sap-cap
cloud-cap-multitenancy
SAP Cloud Application Programming Model (CAP) sample code project with multitenancy using service manager-created SAP HANA containers for tenant data isolation.
Stars: ✭ 33 (-49.23%)
Mutual labels:  sample, sample-code, sap-cap
teched2021-developer-keynote
SAP TechEd 2021 Developer Keynote: Improving Developers' Lives.
Stars: ✭ 23 (-64.62%)
Mutual labels:  sample, sample-code, sap-cap
cloud-cap-risk-management
The SAP Risk Management example applications show how to deploy a CAP (SAP Cloud Application Programming model) application to Cloud Foundry and Kyma.
Stars: ✭ 36 (-44.62%)
Mutual labels:  sample, sample-code, sap-cap
devtoberfest-2021
The home of Devtoberfest 2021 - an open celebration of what makes us developers - coding and collaboration!
Stars: ✭ 212 (+226.15%)
Mutual labels:  sample, sample-code, sap-cap
cloud-platform-iot-starterkit
This repository provides information and code for working with SAP Cloud Platform Internet of Things. It enables users to get an end-to-end IoT solution with either real hardware or simulators up and running fast and start their own extensions and usage based on this.
Stars: ✭ 276 (+324.62%)
Mutual labels:  sample, sample-code
ui5-webcomponents-sample-react
UI5 Web Components Sample TODO application built with React.
Stars: ✭ 47 (-27.69%)
Mutual labels:  sample, sample-code
cloud-abap-rap
This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.
Stars: ✭ 98 (+50.77%)
Mutual labels:  sample, sample-code
hana-ml-samples
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios and is educational content. It covers simple Predictive Analysis Library SQL examples as well as complete SAP HANA design-time “ML scenario”-application content or HANA-ML Python Notebook examples.
Stars: ✭ 67 (+3.08%)
Mutual labels:  sample, sample-code
hcp-portal-service-samples
Code samples of site and page templates, applications, widgets, shell plugins and more, intended to be used as references for development of custom content for SAP HANA Cloud Platform portal service sites.
Stars: ✭ 29 (-55.38%)
Mutual labels:  sample, sample-code
abap-odata-smoke-test
This ABAP Report performs simple smoke tests for activated ODATA services, providing basic automated testing for your ODATA endpoints.
Stars: ✭ 13 (-80%)
Mutual labels:  sample, sample-code
hana-developer-cli-tool-example
Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).
Stars: ✭ 73 (+12.31%)
Mutual labels:  sample, sample-code
cloud-mdk-tutorial-samples
Sample from the SAP mobile development kit tutorials demonstrating various components and features of the MDK in the context of an enterprise mobile solution.
Stars: ✭ 16 (-75.38%)
Mutual labels:  sample, sample-code
cloud-espm-cloud-native
Enterprise Sales and Procurement Model (ESPM) Cloud Native is a project that showcases how an application can be made resilient by implementing resilience design patterns. This application is developed using Spring Boot framework and can be deployed locally as well as on SAP BTP, Cloud Foundry environment.
Stars: ✭ 29 (-55.38%)
Mutual labels:  sample, sample-code
cloud-cap-nodejs-codejam
Material for the CodeJam on SAP Cloud Application Programming Model with Node.js.
Stars: ✭ 76 (+16.92%)
Mutual labels:  sample, sap-cap
iot-edge-samples
Showcase of various extension scenarios for SAP IoT Edge, intelligent edge computing software that provides "microservices at the edge" for Internet of Things (IoT).
Stars: ✭ 16 (-75.38%)
Mutual labels:  sample, sample-code
cloud-sample-spaceflight-java
Build Java applications with the application programming model on SAP Cloud Platform.
Stars: ✭ 49 (-24.62%)
Mutual labels:  sample, sap-cap
cloud-workflow-samples
Workflow sample projects as reference content. Users can download and import the content of this project to their tenant to understand and learn how to consume workflow.
Stars: ✭ 52 (-20%)
Mutual labels:  sample, sample-code
btp-workflow-management-opensap
This repository contain the exercises for the openSAP course "Improve Business Processes with SAP Workflow Management."
Stars: ✭ 30 (-53.85%)
Mutual labels:  sample, sample-code

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.

REUSE status

SAP Fiori UI with Node.js Backend

Build and Run

  1. In a console, execute npm ci in the root folder of your project.
  2. In a console, execute cds watch in the root folder of your project.

Accessing the SAP Fiori App

Open this link in your browser: http://localhost:4004/travel_processor/webapp/index.html

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

SAP Fiori UI with Java Backend

Build and Run

  1. In a console, execute npm ci in the root folder of your project.
  2. In a console, execute mvn spring-boot:run in the root folder of your project.
  3. In another console, execute npm start in folder app\travel_processor of your project (this starts the middleware)

Note: If you access the CAP Java server directly without middleware, you will have to enter mock user credentials admin / admin which are maintained in file application.yml.

Accessing the SAP Fiori App

Open this link in your browser: http://localhost:8080/index.html

Integration Tests

To start OPA tests, open this link in your browser: http://localhost:8080/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 Launchpad service.

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

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).

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) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].