Note: The content of this GitHub repository has been created as a source for the SAP Discovery Center Mission Build an Extension Application Using SAP Graph and SAP Event Mesh. We recommend that you use the mission directly in SAP Discovery Center.
Extend SAP S/4HANA Cloud on SAP Business Technology Platform (SAP BTP) using state-of-the-art methodologies and technologies. Put an event-driven architecture into action, use the SAP Cloud Application Programming Model (CAP) for building on SAP S/4HANA Cloud events, and use SAP Graph to consume unified APIs to retrieve all the required information.
The main intent of this scenario is to complement an existing business process in an SAP solution, which means, enhancing SAP S/4HANA Cloud and SAP Sales Cloud with additional business process steps. This involves adding major logic and/or additional data and goes beyond simple UI changes.
As a call centre employee of a premium beverage company called Icy Cool, John would like to get alerted when new retailer is onboarded as a customer in his region (for example, Canada) and view the customer address details.
John would then proceed to call the customer, understand specific requirements, followed by:
- Identifying and assigning the sales employee to the account team (in SAP Sales Cloud)
- Adding delivery unloading point (in SAP S/4HANA Cloud)
- Updating the status of the customer (in an extension application)
- Track the shipment/delivery status of the Welcome-kit and regular shipments from Logistics Partner (custom API extension for third-party API)
Through this extension application, the beverage company ensures that the call centre employee can set up the desired master data in two SAP systems.
Current Position - What is the challenge?
- Business Partner data available only in SAP S/4HANA Cloud system
- Call center employees need access to SAP S/4HANA Cloud and SAP Sales Cloud for their work
- No custom UI for specific geo marketing use case
Destination - What is the outcome?
- Changes in SAP S/4HANA Cloud communicated via events in real time to extension application
- Custom extension application works independently from SAP S/4HANA Cloud and SAP Sales cloud
- Call center employees only need access to the custom application
Development Challenges
Developing SAP extension applications that work with multiple SAP systems require mastering a broad set of skills for even the simplest data queries, and the applications you develop are sensitive to the smallest product and landscape configuration changes.
Services and Components
- SAP Graph
- SAP Event Mesh
- SAP BTP, Cloud Foundry runtime
- SAP HANA Cloud
The extension application is developed using the CAP and runs on SAP BTP. It consumes platform services like SAP Event Mesh and SAP Graph. The events generated in SAP S/4HANA Cloud are inserted into an SAP Event Mesh queue created by CAP. The application consumes these events and inserts relevant business partners into the local database. The extensions application uses SAP Graph unified APIs to read Business Partner data from the SAP S/4HANA Cloud and SAP Sales Cloud systems and update the relevant details back to the source system.
The tutorial focuses on the following aspects:
- Building a side-by-side extension to SAP S/4HANA Cloud
- Setting up eventing and consuming events from SAP S/4HANA Cloud using SAP Event Mesh
- Configuring custom extensions and consuming data via API calls using SAP Graph
- Developing an application on SAP BTP using CAP
- Implementing an SAP Fiori elements UI
Step 1: Prerequisites
Step 5: Set Up Graph
Step 8: Run the Sample Scenario
Step 9: (Optional) Set Up Mock Server
The tutorial is provided on the "as-is" basis. Currently, there are no known issues for the tutorial project.
Create an issue to get support or to report a bug in GitHub.
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.