This repository contains the material for the SAP TechEd 2023 session AD266 - Learn Once, Apply Everywhere: Code-First Extensions Across SAP Solutions.
This session dives into how tools such as SAP Cloud Application Programming Model, SAP Cloud SDK, and others can be used to develop applications that connect to SAP applications of any kind through APIs.
SAP Cloud Application Programming Model or CAP is a framework of languages, libraries, and tools for building enterprise-grade services and applications. It guides developers through proven best practices and accelerates the development process.
SAP Cloud SDK is a set of libraries and tools for developers to build cloud-native applications on the SAP Business Technology Platform (SAP BTP). CAP internally uses the SAP Cloud SDK for service consumption.
Over the course of this workshop, you will create an application that consumes both an OpenAPI and an OData service.
For the OData part, you will learn how to fetch data from SAP SuccessFactors Goal Plan API by using CAP's Remote Services. You will also add functionality to create goals and sub-goals and delete them by interacting with the SuccessFactors service via the application.
For the OpenAPI part, you will learn how to use the SAP Cloud SDK to conveniently interact with the service in a type-safe manner.
You could then follow similar steps to connect to any other SAP application that exposes an API and easily build extensions for them in the cloud.
The requirements to follow the exercises in this repository are:
- Java 17
- Maven 3.9
- Node 18+
- NPM 9+
- cdsdk 7.0+
- cf cli 7.7+
- Getting Started
- Exercise 1 - Understand the Existing Project Setup
- Exercise 2 - Consuming the Registration API using the SAP Cloud SDK
- Exercise 3 - Get and Import SuccessFactors Goal Plan Service
- Exercise 4 - Consuming the SAP SuccessFactors Goal API using the CAP Remote Services Feature
- Exercise 4.1 - Create a Remote Service Object
- Exercise 4.2 - Fetch all learning goals of a user in GoalServiceHandler
- Exercise 4.3 - Create a Learning Goal
- Exercise 4.4 - Create a Task
- Exercise 4.5 - (Optional) Add a Custom HTTP Header to Requests
- Exercise 4.6 - (Optional) Understanding the Delete Goal Implementation
- Exercise 4.7 - (Optional) How to deal with Custom Fields or Incomplete Metadata
- Exercise 4.8 - (Optional) Understanding and Improving the
GoalServiceFilter
- Exercise 5 - (Optional) Deploying the Application to SAP Business Technology Platform
- Share your feedback
- SAP Customer Influence for SAP S/4HANA Cloud APIs.
Please read the CONTRIBUTING.md to understand the contribution guidelines.
Please read the SAP Open Source Code of Conduct.
Support for the content in this repository is available during the actual time of the online session for which this content has been designed. Otherwise, you may request support via the Issues tab.
Copyright (c) 2023 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.