SAP Code Samples

SAP sample code illustrates software features and capabilities and provide other helpful resources to show how an SAP solution may be extended to meet customer needs. Explore these popular code samples below to learn, get inspired, or help move your own development project along.

ABAP Platform and Programming

ABAP Flight Reference Scenario for the ABAP RESTful Application Programming Model

The Flight Reference Scenario provides sample data and services, as well as legacy business logic, to get familiar with the ABAP RESTful application programming model (RAP).  


ABAP Object Oriented 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 Platform CI/CD Samples
This repository shows different configurations of steps and pipelines specific to the ABAP Environment Pipeline as part of project “Piper.”


ABAP RESTful Application Programming Model Examples
This repository contains several examples how to develop with the ABAP RESTful application programming model (RAP) in SAP Cloud Platform, ABAP environment.


ABAP RESTful Application Programming Model openSAP Samples
This repository offers optional hands-on exercises for the free openSAP Course Building Apps with the ABAP RESTful Application Programming Model (RAP).

See more ABAP samples on

Business Applications

Manage Approval Documents from SAP Ariba
This scenario shows how users can fetch their approval documents from an Ariba procurement system. 


SAP Ariba Extensibility Samples
This repository contains sample applications for extending SAP Ariba using various SAP products, including SAP Integration Suite and SAP Data Intelligence. The purpose is to create a showcase available extensibility options to the SAP Ariba developer.


Find more Ariba and other application samples on


Cloud Mobile End-to-End Sample

SAP Mobile Services provides multiple offerings for you to mobilize your data. This custom use case and built mobile solutions using all of our offerings. Experiencing these applications on your own devices will help you identify the right product for you.


Mobile Development Kit Samples for Developer Tutorials
Samples from SAP Developer Center mobile development kit tutorials demonstrating various components and features of the mobile development kit in the context of an enterprise mobile solution.


SAP Mobile Experience - Sample Export of Mobile Personas
Examples of site content from SAP Launchpad service for the mobile personas (project manager, finance manager, warehouse clerk, retail store manager) to use as a reference for defining your own content.


SAP Mobile Development Kit Samples
Sample mobile development kit applications showcasing capabilities and common how-to topics for the intermediate to experienced user.   


Safety at Work
Enterprise contact tracing solution, made easy by SAP. This asset allows customers and partners to use, build, and extend a contact tracing iOS solution, built on top of an SAP Cloud Platform HANA native multi-target application.    


See more mobile samples based on SAP Cloud SDK and SAP Cloud Platform SDK on

Machine Learning and Predictive

Differentially Private Federated Learning: A Client-level Perspective
Simulate a federated setting and run differentially private federated learning.


Machine Learning Primer for the SAP Developer
Supporting sample code repository for the SAP Developer tutorial.


Run Future Sales Prediction using SAP HANA Cloud Machine Learning Algorithms
Sample showing how to create an SAP HANA Cloud HDI container, load training and testing historical data, and run Predictive Analytics Library (PAL) procedures for just-in-time predicting future sales (energy consumption) values.


SAP HANA Predictive and Machine Learning Scenarios
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios.   


See more Machine Learning samples on

SAP Business Technology Platform (SAP BTP)

SAP BTP, Kyma Runtime Extension Samples
This project contains sample applications for building extensions and microservices on SAP BTP, Kyma runtime.


SAP BTP Showcase: Access SAP HANA Cloud Database Underneath SAP Data Warehouse Cloud
This project creates an SAP HANA Deployment Infrastructure (aka HDI) container on SAP HANA Cloud and persists actual sales data originated from an external system in the same SAP Data Warehouse Cloud’s existing persistence area.   


SAP BTP Use Case: Integrated Order Management Cockpit
SAP BTP use case of Node.js, SAPUI5, Cloud Foundry, and SAP HANA Cloud replicated from legacy systems like ECC or S/4HANA.


SAP Workflow Service Sample Applications
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.


See more SAP BTP samples (formerly SAP Cloud Platform samples) on

SAP Cloud Application Programming Model

Bi-directional, Many-to-Many SAP Cloud Application Programming Model Example
SAP Cloud Application Programming Model sample to demonstrate many-to-many relationships.


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


SAP CAP Samples for Java
Sample application that demonstrates the features of the Java SDK for the SAP Cloud Application Programming Model. 


SAP CAP Samples for Node.js
This repository provides a list of samples and reusable packages created based on SAP Cloud Application Programming Model.  


SAP Risk Management Example Applications
Information and step-by-step instructions on how to develop and deploy an application based on SAP Cloud Application Programming Model (CAP) on SAP BTP using different tools and services.


See more SAP Cloud Application Programming Model samples on

SAP Data Intelligence

DataHub Interactive Education (DINE)
This demo content shows how to consume the features of SAP Data Hub.


SAP Data Hub and Intelligence Integration Examples
Example operators, pipelines, and Dockerfiles for SAP Data Hub showing how to connect to different sources or how to perform certain tasks.


SAP Data Intelligence Replication
Replication from SQL DB to Object Store using SAP Data Intelligence.


SAP Data Intelligence Text Analysis
Web scraping and text analysis using SAP Data Intelligence.


See all SAP Data Intelligence samples on

SAP Event Mesh (formerly Enterprise Messaging in SAP Cloud Platform)

Build an Event-Driven Extension of SAP S/4HANA Cloud 
This sample showcases how to complement an existing business process in SAP S/4HANA Cloud with additional business process steps. This involves adding major logic and/or additional data. 


Messaging Client Java - Samples for SAP Event Mesh 
Samples based on the Java messaging client for SAP Event Mesh. 


Messaging Client Node.js - Samples for SAP Event Mesh 
Samples based on the Node.js messaging client for SAP Event Mesh.


See more SAP Event Mesh samples on


SAP HANA Developer Command Line Interface
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),


SAP HANA Dynamic Deploy
SAP HANA XSA sample code project demonstrating the use of the SAP HANA Deployment Infrastructure (HDI) dynamic deployer.


SAP HANA includes a graph engine for network analysis. The examples demonstrate the usage of built-in algorithms, e.g. for path finding.


SHINE for SAP HANA Extended Application Services, Advanced Model
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.


Software Development on SAP HANA openSAP Course
Exercise materials for openSAP courses targeted to applications developers, SAP HANA Developers, Cloud Application Programming Model developers, and SAP Cloud Platform developers.


See more SAP HANA samples on

SAP TechEd

Devtoberfest 2021 by SAP
The home of Devtoberfest 2021 - an open celebration of what makes us developers - coding and collaboration!


SAP Community Activity Badges
Display your SAP Community public activity, badges, and Devtoberfest contest progress as graphical badges that you can add to any profile that allows for displaying of images, including your GitHub profile


SAP TechEd 2020 Developer Keynote
In this special presentation by developers, for developers, you can join the final sprint review meeting of a fictional company. During this review, three developers of very different backgrounds walk through their code, configuration, and deployment to SAP Cloud Platform of an SAP S/4HANA extension for their company. Watch the associated session video

SAP UI Development

OpenUI5-FHIR Sample App
Sample app demonstrating the use of the openui5-fhir open source project.


SAP Fiori for Android UI Components Demo App
This application demonstrates the available components in the Fiori UI library.


UI5 CAP Event App
Showcase of two UI5 user interfaces, one built with freestyle SAPUI5 (i.e. OpenUI5), the other using SAP Fiori elements, with a CAP backend, using OData V4 with Draft mode.


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.


See more Fiori and UI5 samples on

More Sample Code and Open Source Projects

Visit to explore more SAP Samples or SAP open source projects.