Product Information
How to use SAP Cloud Platform Functions and Enterprise Messaging to build agile, responsive applications and “keep the core clean”
TechEd Keynote Barcelona
In the keynote at TechEd Barcelona on October 23, Björn Goerke and Jana Richter showed how intelligent extension applications can unlock the treasure trove of business events and respond to these events as and when they happen in our IT systems. In their demo, a new contingent worker is hired and an event (BusinessPartner.Created) is sent from SAP S/4HANA to an extension application where it triggers additional application logic (function) to inform the team of the new hire. Björn and Jana showed how easy it is to browse business events in SAP S/4HANA and define these events as triggers to execute short-lasting application logic in your extension applications. By executing functions on demand, you can build intelligent and responsive extension applications without impacting or changing your digital core and its lifecycles.
I will explain in this blog how SAP Cloud Platform Functions (beta) and SAP Cloud Platform Enterprise Messaging enable you to build agile, responsive extension applications in a serverless environment. In other words, in this case Björn’s, you’ll understand how to “keep the digital core clean”.
Function as a Service: SAP Cloud Platform Functions (beta)
SAP Cloud Platform Functions is a fully-managed cloud service for building, running, and managing ephemeral (short-lasting) application functions. Functions are atomic pieces of code that run in stateless compute containers and are mostly fleeting in existence. Functions lie dormant until awakened by a trigger (Event, HTTP Call, Timer), which executes the function on demand. While a function is dormant, it uses no resources and incurs no unnecessary costs. In the industry this is what we refer to as “Function as a Service” because functions are invoked (triggered) on demand in a serverless environment. With this service, SAP is responsible for operating and scaling the resources required to run your function code. This is what we mean with a serverless environment. Essentially, it’s “serverless” from your consumer perspective, not for SAP as cloud provider.
The programming model for developing functions is based on familiar experience with JavaScript/Node.js 8 runtime. Be sure to write Node.js modules entirely in JavaScript without native dependencies. You can develop functions using SAP Web IDE Full-Stack and deploy these functions to SAP Cloud Platform Functions service.
For more information, see:
- SAP Help Portal: SAP Cloud Platform Functions (beta)
- SAP Help Portal: Developing Functions with SAP Web IDE Full-Stack
In Jana’s demo, function code deployed using SAP Cloud Platform Functions retrieved the new contingent worker’s data from SAP Fieldglass and published a notification in the team’s Slack Channel to inform everybody of the new hire. The function code in her extension application was triggered on demand by the BusinessPartner.Created event from SAP S/4HANA and had no impact on underlying business processes.
But how are events passed from source systems to extension applications where they can trigger functions?
This is where SAP Cloud Platform Enterprise Messaging comes in…
SAP Cloud Platform Enterprise Messaging to send and receive messages and events
Applications (like the one shown in the keynote) can subscribe to events from event sources such as SAP S/4HANA using SAP Cloud Platform Enterprise Messaging. SAP Cloud Platform Enterprise Messaging is a cloud-based messaging and event-enablement service, which enables asynchronous (non-blocking) communication between sending and receiving applications, services, and systems. It sends messages and events (special type of message) using standard messaging protocols and exchange patterns (such as publish/subscribe). By subscribing to a business event, extension applications can be sure to receive updates as and when they happen in underlying systems and processes. SAP Cloud Platform Enterprise Messaging can send event notifications to all subscribers of the event without blocking the sending system or applications because event sources do not need to know the subscribers and they do not need to wait for a response,
Event subscriptions
This image shows how SAP Cloud Platform Enterprise Messaging decouples communication between event sources and extension applications. Event sources publish events to an Enterprise Messaging topic to which your applications can subscribe to receive events as and when they happen.
The event-enablement capabilities of SAP Cloud Platform Enterprise Messaging cater for seamless communication and integration between your digital core and your extension applications. You can manage events, event sources, and event consumption.
Unlock the treasure trove and keep the digital core clean
SAP Cloud Platform Functions and SAP Cloud Platform Enterprise Messaging enable you to build agile, responsive applications that act in real time and can be easily extended with decoupled components. In the keynote, Jana showed us how events sent (using SAP Cloud Platform Enterprise Messaging subscriptions) from underlying business processes can trigger functions in your extension applications. You define triggers (Events, HTTP Calls, Timers) and manage and run functions using the SAP Cloud Platform Functions (beta) service.
Part of SAP’s serverless computing offering on SAP Cloud Platform, these services provide you with the key to unlock the treasure trove of business events and build new extension applications which don’t impact underlying business processes or lifecycles meaning that you can “keep the digital core clean.”
More information
If you’re interested in the keynote highlights, see YouTube: SAP TechEd
- Serverless Computing on SAP Cloud Platform
- Getting stared with SAP Cloud Platform Functions (beta) in a serverless environment
- SAP TechEd Keynote Barcelona Revisited: Keeping Your Core Clean with SAP Cloud Platform Functions
- SAP Cloud Platform Capabilities – Enterprise Messaging
- YouTube: SAP serverless computing
Thanks Elisabeth for a really clear overview
Nice overview document Elisabeth.
I was wondering if there is any documentation describing how to set up S4HANA for forwarding events to Enterprise Messaging? Is this provisioning of events provided out-of-the box in S4HANA?
Many thanks in advanced.
Regards,
C.
Hello Charles,
voila: https://blogs.sap.com/2018/12/18/sap-cloud-platform-enterprise-messaging-making-s4hana-event-notification-easy/
For the already enabled objects (e.g. product, business partner, ...) only the settings in the attached blog are needed, so they are enabled 'out-of-the-box'.
Martin
Many thanks Martin!
C.
Hello @Elisabeth Riemann
We are implementing clean core for our client .
Our client has a BTP with On Prem version running side by side .
We understand legacy techniques like "Implicit Enhancement Point" "Post Exit" "PreExit" are all Classic and not recommended for Clean core approach
We have come across some cases where we had to built a custom CDS view .
The question we have is that does the following fall into clean core approach or not ?
1 Create CDS view with Eclipse
2: Extend CDS view with Eclipse