• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A sample application that demonstrates the features of the Java SDK for the SAP Cloud Application Programming Model.

Welcome to CAP Samples for Java

CI status REUSE status

Welcome to the bookshop-java project. It demonstrates how to build business applications using the CAP Java SDK providing a book shop web application as an example. The application in this project enables browsing books, managing books, and managing orders.

Book Object Page

Outline

Overview

This sample application shows how to conveniently create business applications based on CDS domain models, persisting data with H2, or SAP HANA, and exposing an OData V4 frontend with an SAP Fiori frontend on top.

This sample uses Spring Boot as an application framework. Although a CAP Java application isn’t required to build on Spring Boot, it’s the first choice of framework, as it’s seamlessly integrated.

The domain models are defined using CDS entity definitions.

By default, an in-memory H2 database is used for data persistency. Once productively deployed to SAP Business Technology Platform, SAP HANA can be used.

Services are defined using CDS Service Models. The OData V4 Protocol Adapter translates the CDS service models into corresponding OData schemas and maps the incoming OData requests to the corresponding CDS services.

Although CAP provides generic event handlers to serve most CRUD requests out-of-the-box, it’s possible to add business logic through Custom Event Handlers.

A SAP Fiori UI is added using predefined SAP Fiori elements templates. SAP Fiori annotations add information to the service definitions, on how to render the data.

CAP provides built-in multitenancy support with out-of-the box tenant isolation. The sample application demonstrates usage of MTX sidecar based on streamlined MTX and can be deployed as multitenant application. The deprecated classic MTX setup is shown in the mtx-classic branch for reference.

Demonstrated Features

Framework and Infrastructure related Features:

Domain Model related Features:

Service Model related Features:

User Interface related Features:

CDS Maven Plugin Features:

Getting Started

The following sections describe how to set up, build, and run the project.

Prerequisites

Make sure you have set up a development environment (that means, you’ve installed the CDS Compiler, Java, and Apache Maven) as described here.

Clone Build & Run

  1. Clone the project:
  git clone https://github.com/SAP-samples/cloud-cap-samples-java.git
  1. Build and run the application:
  mvn spring-boot:run

Using Eclipse

Optionally, use the following steps to import the project to Eclipse:

  1. Import the project using File > Import > Existing Maven Projects.

    Now, you should see the projects bookshop and bookshop-parent in the project/package explorer view.

  2. In Project Explorer, change the property "Package Presentation" from "Flat" to "Hierarchical" for better understanding.

Building and Running

  1. To compile the project, right-click the file pom.xml in the bookshop-parent project root folder and select Run as > Maven build.

    In the following dialog, enter the string clean install into the field labeled with "Goals" and click "Run".

    Note: This step also compiles the CDS artifacts, thus repeat this once you made changes to the CDS model. This step also generates source files, therefore refresh the "bookshop" project in your IDE.

  2. To run the application, right-click the bookshop project root in the Package Explorer and select Run as > Spring Boot App (make sure you have Spring Tools 4 installed).

    This step creates a default Run Configuration named Bookshop - Application and starts the application afterwards. To go on with the next step, stop the application again.

  3. Then, set the default working directory by editing your Run Configuration via Run > Run Configurations > Bookshop - Application. On the tab Arguments change the default Working Directory to:

    ${workspace_loc:bookshop-parent}

    Afterwards, click Run. This step starts the applications main method located in src/main/java/my/bookshop/Application.java.

  4. Use the following links in the browser to check if everything works fine:

    http://localhost:8080/: This should show the automatically generated index page of served paths. http://localhost:8080/fiori.html: This is the actual bookshop application UI. http://localhost:8080/swagger/index.html: This is providing a Swagger UI for the CatalogService API.

    You'll start with a predefined stock of books as this procedure starts the bookshop application with a CSV-initialized in-memory H2 database.

    Two mock users are defined for local development:

    • User: user, password: user to browse books
    • User: admin, password: admin to manage books and orders

Using IntelliJ Idea (Community and Ultimate)

IntelliJ can handle the project more or less out-of-the-box. Since some of the event handlers in the project rely on the code generated from the CDS model the build path of the project (module) needs to be extended with the folder containing the generated code. In order to add the generated code you need to add the 'gen' folder to the build path:

  • Open the project settings.
  • Navigate to the 'modules' section.
  • Select the srv/src/gen folder and mark it as 'sources'.
  • Save and leave the project settings.
  • Trigger a rebuild.

After the generated code is considered by IntelliJ's build the application can be handled just as any other Spring Boot application in IntelliJ.

Database Setup and Spring Profiles

The application comes with two predefined profiles that determine how to run the application: default, and cloud (see srv/src/main/resources/application.yaml).

  • The default profile specifies to use an in-memory H2 database. The in-memory database is set up automatically during startup of the application and initialized with some example data from CSV files.

  • When deploying the application to Cloud Foundry, the CF Java Buildpack automatically configures the cloud Spring profile. This profile doesn’t specify any datasource location. In that case CAP Java can automatically detect SAP HANA service bindings available in the environment.

API_BUSINESS_PARTNER Remote Service and Spring Profiles

The behavior of the API_BUSINESS_PARTNER remote service is controlled using profiles (see srv/src/main/resources/application.yaml):

  • Using mock data via internal service: When using only the default profile (default when omitting any profile setting), the API_BUSINESS_PARTNER API is mocked as a local service using the mock data.

  • Using mock data via internal service through OData: With the mocked profile, all requests to the API_BUSINESS_PARTNER service will be routed through HTTP and OData to itself (http://localhost:<port>/api/API_BUSINESS_PARTNER/...). This mode is similar to using a real remote destination, and such helps to prevent issues from differences in local service and remote service behavior.

  • Using the sandbox environment: You can access data from the SAP API Business Hub sandbox with the sandbox profile. The API key needs to be provided with the environment variable CDS_REMOTE_SERVICES_API_BUSINESS_PARTNER_DESTINATION_HEADERS_APIKEY. You can retrieve it by clicking on Show API Key on this page after logging in.

  • Using S/4HANA cloud or on-premise system: With the destination profile, you can access data from a real S/4HANA system. You need to create a destination with name s4-destination and make sure that an instance of XSUAA and destination service are bound to your application. For an on-premise destination, you additionally need to bind the connectivity service and add an additional property URL.headers.sap-client with the S/4HANA client number to your destination.

The profiles sandbox and destination can be combined with the default profile for hybrid testing and with the cloud profile when deployed to the cloud.

Deploy to SAP Business Technology Platform, Cloud Foundry

CAP Java applications can be deployed to the SAP Business Technology Platform either in single tenant or in multitenancy mode. See Multitenancy in CAP Java for more information.

Prerequisites:

  • Install the Cloud MTA Build Tool: npm install -g mbt.
  • Install the Cloud Foundry Command Line Interface.
  • Get an SAP Business Technology Platform account to deploy the services and applications.
  • Create a SAP HANA Cloud Instance in your SAP Business Technology Platform space.
  • Ensure you have an entitlement for SAP HANA Schemas & HDI Containers with plan hdi-shared in the same space.
  • Ensure that your CF instances are connected to Internet to download SAPMachine JRE 17 as it is available in sap_java_buildpack in online mode only.

Deploy as Single Tenant Application:

  • Rename mta-single-tenant.yaml to mta.yaml
  • Run mbt build
  • Run cf login
  • Run cf deploy mta_archives/bookshop_1.0.0.mtar

Deploy as Multitenant Application:

  • Rename mta-multi-tenant.yaml to mta.yaml
  • Run mbt build
  • Run cf login
  • Run cf deploy mta_archives/bookshop-mt_1.0.0.mtar
  • Go to another subaccount in your global account, under subscriptions and subscribe to the application you deployed.
  • Run cf map-route bookshop-mt-app <YOUR DOMAIN> --hostname <SUBSCRIBER TENANT>-<ORG>-<SPACE>-bookshop-mt-app or create and bind the route manually.

Before you can access the UI using the (tenant-specific) URL to the bookshop(-mt)-app application, make sure to Setup Authorizations in SAP Business Technology Platform.

Deploy to SAP Business Technology Platform, Kyma Runtime

TIP: You can find more information in the Deploy Your CAP Application on SAP BTP Kyma Runtime tutorial and in the Deploy to Kyma/K8s guide of the CAP documentation.

Preconditions

  • BTP Subaccount with Kyma Runtime
  • BTP Subaccount with Cloud Foundry Space
  • HANA Cloud instance available for your Cloud Foundry space
  • BTP Entitlements for: HANA HDI Services & Container plan hdi-shared, Launchpad Service plan standard
  • Container Registry (e.g. Docker Hub)
  • Command Line Tools: kubectl, kubectl-oidc_login, pack, docker, helm, cf
  • Logged into Kyma Runtime (with kubectl CLI), Cloud Foundry space (with cf CLI) and Container Registry (with docker login)
  • @sap/cds-dk >= 6.6.0

Add Deployment Files

CAP tooling provides you a Helm chart for deployment to Kyma.

For single tenant deployment, replace the requires section in .cdsrc.json with:

    "requires": {
        "auth": {
            "kind": "xsuaa"
        },
        "approuter": {
            "kind": "cloudfoundry"
        },
        "db": {
            "kind": "hana-cloud"
        }
    },

For multi tenant deployment, replace the requires section in .cdsrc.json with:

    "requires": {
        "multitenancy": true,
        "extensibility": true,
        "toggles": true,
        "auth": {
            "kind": "xsuaa"
        },
        "approuter": {
            "kind": "cloudfoundry"
        }
    },

Add the CAP Helm chart with the required features to this project:

cds add helm

Use API_BUSSINESS_PARTNER Remote Service (optional, single tenant only)

You can try the API_BUSINESS_PARTNER service with a real S/4HANA system with the following configuration:

  1. Create either an on-premise or cloud destination in your subaccount.

  2. Add configuration required for the destination service by executing the following command.

    cds add destination
  3. Set the profiles cloud and destination active in your values.yaml file:

    srv:
      ...
      env:
        SPRING_PROFILES_ACTIVE: cloud,destination
  4. For on-premise only: Add the connectivity service to your Helm chart:

    cds add connectivity

    Note: cds add helm will not add configuration required to create a Connectivity Service Instance. This Service Instance should be created by the Kyma Cluster Administrator. For more information regarding configuration of Connectivity Instance, please check the documentation.

See also: API_BUSINESS_PARTNER Remote Service and Spring Profiles

Prepare Kubernetes Namespace

Create container registry secret

Create a secret container-registry with credentials to access the container registry:

bash ./scripts/create-container-registry-secret.sh

The Docker Server is the full qualified hostname of your container registry.

Create a HDI container / Service Manager Instance and a Secret

This step is only required if you're using a BTP Trial account. If you're using a production or a free tier account then you can create HDI Container from Kyma directly by adding a mapping to your Kyma namespace in your HANA Cloud Instance and skip this step.

Single Tenant
bash ./scripts/create-db-secret.sh bookshop-db

It will create a HDI container bookshop-db instance on your currently targeted Cloud Foundry space and a secret bookshop-db with the credentials in your current Kubernetes namespace.

Make the following changes to your chart/values.yaml.

srv:
  bindings:
    db:
-     serviceInstanceName: hana
+     fromSecret: bookshop-db
...

hana-deployer:
  bindings:
    hana:
-     serviceInstanceName: hana
+     fromSecret: bookshop-db

...
- hana:
-   serviceOfferingName: hana
-   servicePlanName: hdi-shared

Make the following changes to your chart/Chart.yaml.

dependencies:
  ...
-  - name: service-instance
-    alias: hana
-    version: ">0.0.0"
  ...
Multi Tenant
bash ./scripts/create-sm-secret.sh bookshop-sm

It will create a Service Manager bookshop-sm instance on your currently targeted Cloud Foundry space and a secret bookshop-sm with the credentials in your current Kubernetes namespace.

Make the following changes to your chart/values.yaml.

srv:
  bindings:
    service-manager:
-     serviceInstanceName: service-manager
+     fromSecret: bookshop-sm
...

sidecar:
  bindings:
    service-manager:
-     serviceInstanceName: service-manager
+     fromSecret: bookshop-sm

...
- service-manager:
-   serviceOfferingName: service-manager
-   servicePlanName: container

Make the following changes to your chart/Chart.yaml.

dependencies:
  ...
-  - name: service-instance
-    alias: service-manager
-    version: ">0.0.0"
  ...

Build

cds build --production

Build image for CAP service:

mvn clean package -DskipTests=true
pack build $YOUR_CONTAINER_REGISTRY/bookshop-srv \
        --path srv/target/*-exec.jar \
        --buildpack gcr.io/paketo-buildpacks/sap-machine \
        --buildpack gcr.io/paketo-buildpacks/java \
        --builder paketobuildpacks/builder:base \
        --env SPRING_PROFILES_ACTIVE=cloud \
        --env BP_JVM_VERSION=17

(Replace $YOUR_CONTAINER_REGISTRY with the full-qualified hostname of your container registry)

Build Approuter Image:

pack build $YOUR_CONTAINER_REGISTRY/bookshop-approuter \
     --path app \
     --buildpack gcr.io/paketo-buildpacks/nodejs \
     --builder paketobuildpacks/builder:base \
     --env BP_NODE_RUN_SCRIPTS=""

Build database deployer image (single tenant only):

pack build $YOUR_CONTAINER_REGISTRY/bookshop-hana-deployer \
     --path db \
     --buildpack gcr.io/paketo-buildpacks/nodejs \
     --builder paketobuildpacks/builder:base \
     --env BP_NODE_RUN_SCRIPTS=""

Build sidecar image (multi tenant only):

pack build $YOUR_CONTAINER_REGISTRY/bookshop-sidecar \
     --path mtx/sidecar/gen \
     --buildpack gcr.io/paketo-buildpacks/nodejs \
     --builder paketobuildpacks/builder:base \
     --env BP_NODE_RUN_SCRIPTS=""

Push container images

You can push all the container images to your container registry, using:

docker push $YOUR_CONTAINER_REGISTRY/bookshop-srv

docker push $YOUR_CONTAINER_REGISTRY/bookshop-approuter

Single Tenant

docker push $YOUR_CONTAINER_REGISTRY/bookshop-hana-deployer 

Multi Tenant

docker push $YOUR_CONTAINER_REGISTRY/bookshop-sidecar

Configuration

Make the following changes in the chart/values.yaml file.

  1. Change value of global.domain key to your cluster domain.

  2. Replace <your-cluster-domain> in xsuaa.parameters.oauth2-configuration.redirect-uris with your cluster domain.

  3. Replace <your-container-registry> with your container registry.

  4. Make the following change to add backend destinations required by Approuter.

-  backendDestinations: {}
+  backendDestinations:
+     backend:
+       service: srv
+     mtx-api:
+       service: srv
  1. Add your image registry secret created in Create container registry secret step.
global:
  domain: null
-  imagePullSecret: {}
+  imagePullSecret:
+    name: container-registry
  1. If the application is deployed multiple times in the same cluster, make sure to adapt the values of xsappname and appName under saasRegistryParameters in values/Chart.yaml

Deployment

Deploy the helm chart using the following command:

Single Tenant

helm install bookshop ./chart --set-file xsuaa.jsonParameters=xs-security.json

Before you can access the UI you should make sure to Setup Authorizations in SAP Business Technology Platform.

Click on the approuter url logged by the helm install to access the UI.

Multi Tenant

helm install bookshop ./chart --set-file xsuaa.jsonParameters=xs-security-mt.json

In case of multi tenant, you'll have to subscribe to the application from a different subaccount. You can follow the steps mentioned here to access the application.

Setup Authorizations in SAP Business Technology Platform

To access services and UIs that require specific authorizations (e.g. admin) you need to assign a corresponding role and role collections to your user in SAP BTP Cockpit.

  1. For single-tenant applications open the subaccount where you deployed the bookshop application to. For multitenant applications open the subaccount where you subscribed to the bookshop application.
  2. Navigate to Security -> Roles
  3. Create a role with name bookshop-admin based on the admin role template of the bookshop application:
    1. Enter a Business Partner ID of your S/4 system as value for the businessPartner attribute. When using the sandbox environment use 10401010.
  4. Navigate to Security -> Role Collections
  5. Create a new role collection bookshop-admin:
    1. Assign the bookshop-admin role to this role collection
    2. Assign the role collection to your user

Code Tour

Take the guided tour in VS Code through our CAP Samples for Java and learn which CAP features are showcased by the different parts of the repository. Just install the CodeTour extension for VS Code.

Get Support

In case you have a question, find a bug, or otherwise need support, please use our community. See the documentation at https://cap.cloud.sap for more details about CAP.

License

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

More Repositories

1

cloud-cap-samples

This project contains sample applications for SAP Cloud Application Programming Model.
JavaScript
368
star
2

abap-platform-rap-opensap

Samples for the openSAP course "Building Apps with the ABAP RESTful Application Programming model (RAP)."
332
star
3

abap-cheat-sheets

Explore ABAP syntax in a nutshell supported by executable demo examples.
ABAP
321
star
4

machine-learning-diff-private-federated-learning

Simulate a federated setting and run differentially private federated learning.
Python
315
star
5

devtoberfest-2021

The home of Devtoberfest 2021 - an open celebration of what makes us developers - coding and collaboration!
JavaScript
214
star
6

fiori-elements-opensap

This repository offers optional hands-on exercises for the free openSAP course "Developing and Extending SAP Fiori Elements Apps."
ABAP
207
star
7

abap-platform-rap-workshops

This repository contains materials for workshops about the ABAP RESTful Application Programming Model (RAP).
ABAP
188
star
8

cap-sflight

Using SAP Cloud Application Programming Model and SAP Fiori elements to build a simple travel management app, both with Node.js and Java.
CAP CDS
177
star
9

sap-devtoberfest-2020

The home of Devtoberfest 2020 - an open celebration of what makes us developers – coding and collaboration!
JavaScript
176
star
10

abap-platform-refscen-flight

SFlight is back! This is the Flight Reference Scenario for the ABAP RESTful Application Programming Model.
158
star
11

kyma-runtime-extension-samples

This project contains sample applications for building extensions and microservices on SAP BTP, Kyma runtime.
JavaScript
148
star
12

cloud-abap-rap

This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.
146
star
13

abap-oo-basics

In support of the YouTube video series on ABAP Object Oriented basics, this repository contains the ABAP source code samples which are used in the video series.
ABAP
137
star
14

hana-xsa-opensap-hana7

openSAP HANA7 Course Exercise Materials - Software Development on SAP HANA (Update Q1/2019)
JavaScript
136
star
15

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.
CAP CDS
128
star
16

hana-shine-xsa

SAP HANA Interactive Education for SAP HANA Extended Application Services, Advanced Model (SHINE for XS Advanced) is an education content to learn, develop, and deploy SAP HANA XS Advanced Model application and is a successor of SHINE for XS Classic.
JavaScript
114
star
17

multi-cloud-html5-apps-samples

Examples of HTML5 applications for multiple SAP BTP environments. The examples show how you can use standalone application routers or managed application routers to achieve different goals, and they demonstrate the capabilities of the SAP HTML5 Application Repository service for SAP BTP.
HTML
95
star
18

cf-mta-examples

The repository contains multitarget application (MTA) examples for SAP BTP, Cloud Foundry environment. Examples demonstrate how to achieve different goals using MTAs and show the capabilities of MTA deployment service in the Cloud Foundry environment.
Java
89
star
19

hana-shine

SAP HANA INteractive Education (SHINE) is an education content to learn, develop and deploy SAP HANA Application Services (XS Engine) based applications within the SAP HANA Platform
89
star
20

btp-setup-automator

Automate the setup of your SAP BTP account with the SAP BTP CLI and other CLI tools.
Python
85
star
21

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).
CSS
82
star
22

sap-tech-bytes

Accompanying the SAP Developer Advocates "SAP Tech Bytes" initiative.
JavaScript
76
star
23

cloud-bulletinboard-ads

This is the bulletinboard-ads sample application code used in the openSAP course: Cloud-Native Development with SAP Business Technology Platform (formerly SAP Cloud Platform).
76
star
24

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.
JavaScript
75
star
25

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.
Jupyter Notebook
74
star
26

cloud-commerce-sample-setup

Find the sample manifest.json and configuration files that you can use to build out your commerce repository in SAP Commerce Cloud.
TypeScript
73
star
27

hana-opensap-cloud-2020

Exercise materials for openSAP courses targeted to application developers, SAP HANA developers, Cloud Application Programming Model developers, and SAP Business Technology Platform developers.
JavaScript
70
star
28

byd-api-samples

A set of Postman collections that enables users to consume SAP Business ByDesign web services.
69
star
29

abap-platform-fiori-feature-showcase

Feature showcase that demonstrates and documents how to implement annotation-driven SAP Fiori Elements UI features for oData V4, using the ABAP RESTful Application Programming Model (RAP).
65
star
30

btp-cap-genai-rag

Explore this repository for GenAI samples on SAP Business Technology Platform (SAP BTP). We provide examples for single and multitenant versions, showcasing integration of LLMs via SAP AI Core, LangChain in SAP CAP, and advanced techniques like Retrieval Augmented Generation (RAG).
TypeScript
64
star
31

btp-cf-cap-multitenant-susaas

Sample project that demonstrates how to setup a multitenant application for a software-as-a-service scenario using the SAP BTP Cloud Foundry environment. Developers learn how to implement their own CAP (mtxs) based SaaS app including an SaaS API and integration with various essential SAP BTP service offerings.
JavaScript
61
star
32

btp-cap-multitenant-saas

Sample project that demonstrates how to setup a multitenant application for a Software-as-a-Service scenario, leveraging the Kyma and Cloud Foundry Runtimes of the SAP Business Technology Platform. Developers learn how to implement their own CAP (mtxs) based SaaS app including an SaaS API and integration with various essential SAP BTP service of...
JavaScript
61
star
33

btp-genai-starter-kit

This repo aims to help developers to get into the genAI topic quicker by automating AI Core and HANA Vector Engine provisioning and configuration with Terraform Provider for SAP BTP.
Python
60
star
34

ui5-webcomponents-sample-vue

UI5 Web Components Sample TODO application built with Vue.
Vue
57
star
35

cloud-cap-hana-swapi

SAP Cloud Application Programming Model fun sample to demonstrate many-to-many relationships.
CAP CDS
56
star
36

ui5-typescript-helloworld

Showcase of a TypeScript setup for developing UI5 applications.
TypeScript
55
star
37

openui5-pwa-sample

How to build a progressive web app (PWA) with OpenUI5.
JavaScript
54
star
38

ui5-webcomponents-sample-react

UI5 Web Components Sample TODO application built with React.
JavaScript
54
star
39

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.
CAP CDS
52
star
40

teched2023-XP286v

SAP Business Technology Platform Solution Diagrams
52
star
41

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.
JavaScript
51
star
42

abap-exercises-codejam

Material for CodeJams on SAP Business Technology Platform, ABAP Environment and ABAP RESTful Application Programming Model.
48
star
43

cloud-cf-helloworld-nodejs

A "Hello World" application for Cloud Foundry using a simple RESTful API in Node.js with persistency in PostgreSQL and SAPUI5 UIs.
48
star
44

fiori-elements-v4-cap-advanced

Learning journey to develop SAP Fiori Elements applications based on SAP CAP OData v4 services. Demonstrating advanced concepts required for many business applications.
JavaScript
45
star
45

datasphere-content

Use sample content to explorer SAP Datasphere. The downloads contain sample data as CSV files, but could also include model / metadata information. See the README files for details.
44
star
46

ui5-typescript-tutorial

Tutorial for building UI5 applications with TypeScript.
TypeScript
40
star
47

btp-build-resilient-apps

SAP S/4HANA extension application following patterns for building resilient applications on SAP BTP, such as the use of DevOps, observability, integration with business process workflows, and multi-region failover
TypeScript
40
star
48

cloud-sample-node-chat

A simple chat application that is built on Node.js.
CSS
39
star
49

ui5-exercises-codejam

Material for SAP CodeJam events on UI5. Step-by-step guide explaining how build a frontend web application using UI5.
JavaScript
39
star
50

odata-basics-handsonsapdev

A simple OData service to accompany the "Back to basics: OData" series on the Hands-on SAP Dev live stream show.
HTML
39
star
51

cloud-sfsf-benefits-ext

SAP Employee Benefits Management is a sample extension application for SuccessFactors Employee Central. The application runs on SAP Cloud Platform and can be used by employees to make orders in specific benefits' campaigns and by HR managers to manage employee benefits and set up new benefits campaigns.
Java
38
star
52

ui5-webcomponents-sample-angular

UI5 Web Components Sample TODO application built with Angular.
JavaScript
36
star
53

btp-generative-ai-hub-use-cases

Samples on how to build industry solution leveraging generative AI capabilities on top of SAP BTP and integrated with SAP S/4HANA Cloud.
Jupyter Notebook
35
star
54

teched2021-DEV160

DEV160 - Scale Application Development with SAPUI5
35
star
55

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.
JavaScript
34
star
56

btp-azure-opensap

Exercises and sample code for the openSAP course "Building Applications on SAP BTP with Microsoft Services"
Java
34
star
57

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.
Java
34
star
58

datahub-integration-examples

Example operators, pipelines, and Dockerfiles for SAP Data Hub showing how to connect to different sources or how to perform certain tasks.
Python
34
star
59

btp-service-metadata

Contains the metadata of SAP BTP services - in a machine-readable format - available in an SAP BTP pay-as-you-go account.
jq
33
star
60

btp-resource-consumption-monitor

Monitors the CPEA credit consumption of your global account and alerts on increased usage
CAP CDS
33
star
61

btp-developer-guide-cap

SAP BTP Developer’s Guide offers developer guidance to software developers on how to implement business applications using SAP Cloud Application Programming Model on SAP BTP Cloud Foundry and SAP BTP Kyma Runtime following the best practices.
32
star
62

cloud-application-security-sample

Demonstrate authorizations on data level into Spring-based SAP BTP applications. We make use of the Spring Security ACL and integrate it with the XSUAA service and the Java Client Security Library offered by SAP.
Java
32
star
63

abap-file-uploader

Sample code to demonstrate easy upload and filling of a custom ABAP table with data from the client side (JSON).
ABAP
31
star
64

teched2023-AD283v

Develop Applications with SAPUI5 and Best Practices of SAP
30
star
65

btp-side-by-side-extension-learning-journey

Starter Template for the learning journey "Building side-by-side extensions on SAP BTP".
30
star
66

cap-hana-exercises-codejam

This repo contains the exercise instructions, starting template code, and sample solution for the CodeJam based on SAP Cloud Application Programming Model.
JavaScript
29
star
67

teched2022-DT281

Build and Extend Apps with the ABAP RESTful Application Programming Model
29
star
68

btp-ai-sustainability-bootcamp

This github repository contains the sample code and exercises of btp-ai-sustainability-bootcamp, which showcases how to build Intelligence and Sustainability into Your Solutions on SAP Business Technology Platform with SAP AI Core and SAP Analytics Cloud for Planning.
Jupyter Notebook
29
star
69

abap-platform-rap630

This repository contains the material for the RAP hands-on workshop called RAP630 - Use ABAP Cloud for developer extensibility.
ABAP
29
star
70

teched2022-DT181

Boost Your Productivity in Developing SAP Fiori Apps
CAP CDS
28
star
71

abap-alv-google-upload-sheet

Sample demonstrating export of ALV Grid data from SAP GUI directly to Google Drive and display exported data snapshots automatically in Google Sheets.
ABAP
28
star
72

btp-aws1-opensap

This repository contains exercises and sample code for the openSAP course "Build Resilient Applications on SAP BTP with Amazon Web Services."
JavaScript
28
star
73

cloud-mdk-samples

Sample mobile development kit applications showcasing capabilities and common how-to topics for the intermediate to experienced user.
JavaScript
27
star
74

frun-csa-policies-best-practices

Best practices check examples for creating CSA policies in SAP Focused Run
PowerShell
27
star
75

teched2021-developer-keynote

SAP TechEd 2021 Developer Keynote: Improving Developers' Lives.
JavaScript
26
star
76

sme-partner-reference-application

The SME partner reference application provides a "golden path" to build, deploy, run, and integrate full-stack cloud applications on the SAP Business Technology Platform for SAP partners in the SME market.
JavaScript
25
star
77

security-services-tools

If you use security-related services and tools such as EWA, SOS, System Recommendations, Configuration Validation, or a security dashboard in SAP Solution Manager, the ABAP reports in this repository can help with further analysis and development.
ABAP
25
star
78

xf-application-mocks

Contains lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios. In conjunction with SAP Business Technology Platform, kyma runtime, the efficient implementation of application extensions is supported without the need for real SAP applications being accessible during development.
JavaScript
25
star
79

cloud-sdk-js

This repository provides code samples and examples how to use the SAP Cloud SDK for JavaScript/TypeScript. The SAP Cloud SDK makes developing applications on the SAP Business Technology Platform easy.
TypeScript
25
star
80

analytics-cloud-datasphere-community-content

Download content packages for SAP Analytics Cloud and SAP Datasphere. Find technical samples, best practices or business scenarios. Packages contain data models, visualisations and sample data (if applicable).
JavaScript
25
star
81

acl2020-commonsense

Source code for paper on commonsense reasoning for 2020 Annual Conference of the Association for Computational Linguistics (ACL) 2020.
Python
25
star
82

btp-terraform-samples

Best practices and examples to use the Terraform provider for SAP BTP.
HCL
24
star
83

teched2021-IIS160

IIS160 - Accelerate the Development of SAP Fiori Apps Using SAP Fiori Elements
CAP CDS
24
star
84

hana-cloud-learning

This repository contains sample code and sample data for SAP HANA Cloud learning content such as like learning tracks, tutorials, and missions.
TSQL
24
star
85

abap-platform-rap100

RAP100
ABAP
24
star
86

cap-llm-plugin-samples

CAP LLM Plugin helps developers create tailored Generative AI based CAP applications without exposing confidential data to LLM by anonymizing sensitive data leveraging SAP HANA Cloud Data Anonymization.
24
star
87

fiori-elements-incident-management

This repository contains the sample OData V4 service material for the tutorials provided in the SAP Developer Center.
CAP CDS
23
star
88

azure-openai-aicore-cap-api

With AI Core as a proxy for Azure OpenAI Services, we are able to perform prompt engineering, e.g. to add more context in the form of (SAP) documents or to perform input validation. This repo serves as a starting point for such a raw proxy and shows how SAP BTP, AI Core can be consumed and exposed via a CAP API.
Jupyter Notebook
23
star
89

teched2023-DT182v

Use ABAP Cloud for Developer Extensibility
22
star
90

fiori-tools-samples

This project contains sample SAP Fiori elements applications built using SAP Fiori tools.
JavaScript
22
star
91

ui5-typescript-walkthrough

A walkthrough tutorial that introduces all major development paradigms of OpenUI5 using TypeScript with OpenUI5.
TypeScript
22
star
92

acl2022-self-contrastive-decorrelation

Source code for ACL 2022 paper "Self-contrastive Decorrelation for Sentence Embeddings".
Python
22
star
93

digital-manufacturing-extension-samples

Use these sample extensions to learn how to build your own extensions on top of SAP Digital Manufacturing.
JavaScript
21
star
94

integrated-business-planning-excel-add-in-templates

Collection of best practices planning view templates for the SAP Integrated Business Planning (IBP) Add-In for Microsoft Excel.
21
star
95

teched2023-AD181v

Delve into ABAP Cloud on SAP BTP, ABAP Environment
21
star
96

smart-co2nverter-ai

A mobile application enabling bank customers to be more climate conscious while strengthening their loyalty to the bank.
TypeScript
20
star
97

commerce-migration-toolkit

SAP Commerce extensions to support data migrations to SAP Commerce Cloud.
Java
20
star
98

ui5-webcomponents-sample-svelte

UI5 Web components sample TODO application built with Svelte.
Svelte
20
star
99

cloud-btp-cli-api-codejam

Material for the CodeJam on the CLI and APIs for the SAP Business Technology Platform.
Shell
20
star
100

ui5-service-worker-sample

ui5-service-worker-sample demonstrates how the Service Worker API, available in modern web browsers, could be used in a UI5 app to realize different caching strategies.
JavaScript
20
star