Code Monkey home page Code Monkey logo

sap-samples / btp-build-resilient-apps Goto Github PK

View Code? Open in Web Editor NEW
37.0 13.0 59.0 75.93 MB

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

License: Apache License 2.0

Shell 3.18% CAP CDS 11.35% JavaScript 0.27% HTML 1.57% TypeScript 66.14% Dockerfile 0.20% Smarty 17.06% jq 0.23%
sample sample-code sap-s4hana sap-btp sap-event-mesh cloud-foundry devops alm sap-hana-cloud sap-fiori

btp-build-resilient-apps's Introduction

Enhance core ERP business processes with resilient applications on SAP BTP

REUSE status

Description

Extension applications built on SAP Business Technology Platform fulfill critical business processes. Ensuring their availability and stability, even in the face of service disruptions at the application, service, or platform level, is the responsibility of application developers and administrators. This scenario demonstrates patterns for building resilient applications on SAP BTP, such as use of DevOps, observability, integration with business process workflows, and multi-region failover.

Challenge

Extension applications provide customers with unlimited flexibility but bring added considerations about topics such as high availability, fault tolerance, and the software development lifecycle. Solving for these problems is the responsibility of the application developer.

Solution

Apply DevOps to your custom development through use of unit tests and automation of builds and deployments. Enhance microservices with auto-scaling and monitoring for observability and implement multi-region failover of services such as the SAP Fiori Launchpad to create truly resilient applications.

Outcome

Infuse qualities of resilience into your extension applications from the first step. Doing so will maximize a consistent and performant user experience, while empowering developers to continuously improve and enhance the value delivered to business users.

Business Scenario

This business scenario is used to showcase how to build an SAP S/4HANA on-premise extension application on SAP BTP. The scenario in a nutshell:

John who is an employee of Business Partner Validation Firm iCredible, which is a third-party vendor of ACME Corporation would like to get notifications whenever new Business Partners are added in the S/4HANA backend system of ACME Corporation. John would then be able to review the Business Partner details in his extension app. He would proceed to visit the Business Partner’s registered office and do some background verification. John would then proceed to update/validate the verification details into the extension app. Once the details are verified, the Business Partner gets activated in the S/4HANA system of ACME Corporation.

This means:

  • You will deploy a custom extension application on SAP Business Technology Platform that works independently from the SAP S/4HANA system

  • Changes in the SAP S/4HANA system are communicated via events in real-time to the extension application

  • The Vendor personnel only needs access to the extension application and not to SAP S/4HANA

Solution Diagram

solution diagram

The Business Partner Validation application is developed using the SAP Cloud Application Programming Model (CAP) and runs on the SAP BTP, Cloud Foundry runtime. It leverages platform services like SAP Event Mesh, SAP HANA Cloud and the SAP Private Link service. Whenever a change in the SAP S/4HANA on-premise system occurs, an event on SAP Event Mesh is triggered. The CAP application on SAP BTP will asynchronously consume the event and process the payload. This means, some additional data is read using OData APIs from the SAP S/4HANA on-premise backend and stored in SAP HANA Cloud on SAP BTP to be independent from the actual SAP S/4HANA system. In case of changes, the SAP Cloud Application Programming Model is again used to write data back into the SAP S/4HANA system.

Requirements

The required systems and components are:

  • SAP S/4HANA on premise system.
  • SAP BTP account

Entitlements/Quota required in your SAP Business Technology Platform Account:

Service Plan Number of instances
Connectivity lite 1
Destination lite 1
HTML5 Application Repository app-host 1
Event Mesh default 1
Application Logging lite 1
Authorization & Trust Management application 1
SAP HANA Schemas & HDI Containers hdi-shared 1
SAP HANA Cloud
Cloud Foundry runtime
Application Autoscaler standard 1

Subscriptions required in your SAP Business Technology Platform Account:

Subscription Plan
SAP Business Application Studio standard
Event Mesh standard
Launchpad Service standard
Continuous Integration & Delivery default
Cloud Transport Management saas-application

Setup & Configuration

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

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.

btp-build-resilient-apps's People

Contributors

anirban-sap avatar btbernard avatar dependabot[bot] avatar hterminasyan avatar maxstreifeneder avatar nishnp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btp-build-resilient-apps's Issues

fatal: Remote branch extension not found in upstream origin

When I try to clone from SAP Business Application Studio with command:
git clone -b extension https://github.com//btp-build-resilient-apps

I get the following error:

Cloning into 'btp-build-resilient-apps'...
fatal: Remote branch extension not found in upstream origin

Are you able to let me know why I am getting this error and how to resolve it?

Issues when running script "npm run deploy:trial"

Hi there,

I'm using the trial instance for this tutorial.

I faced these in Step 05: Deploy SAP Cloud Application Programming Model (CAP) Application, point 18

When running npm run deploy:trial, I get the below error.

Creating service "BPVerification-ems" from MTA resource "BPVerification-ems"...
Error monitoring creation or update of services: Error creating service "BPVerification-ems" from offering "enterprise-messaging" and plan "dev": Service broker error: Service broker enterprise-messaging-service-broker failed with: The plan dev, lite and application must not be used anymore. The trial offering for the Event Mesh Service is discontinued. Currently, there is no replacement planned.

Does it mean that this tutorial can't be completed with a trial instance anymore?

Thanks.

gen/db is not getting generated

ERROR the "mta.yaml" file is not valid:
line 49: the "gen/db" path of the "BPVerification-db-deployer" module does not exist

i don't see an error:
Run npm audit for details.
[2023-07-27 16:51:16] INFO executing the "npm run build:cf" command...

[email protected] build:cf
npm run build:cds && npm run cleanup:ts && npm run build:ts && npm run build --prefix app/businesspartners

.

[email protected] build:cds
cds build --production

[cds] - the following build tasks will be executed
[cds] - {
"build": {
"target": "gen",
"tasks": [
{"for":"nodejs", "src":"srv", "options":{"model":["db","srv","app","srv/external/OP_API_BUSINESS_PARTNER_SRV"]}}
]
}
}

[cds] - building project [/Users/i074240/Documents/GitHub/CLM/projects/btp-build-resilient-apps], clean [true]
[cds] - cds [6.8.4], compiler [3.9.4], home [/Users/i074240/Documents/GitHub/CLM/projects/btp-build-resilient-apps/node_modules/@sap/cds]

.[cds] - done > wrote output to:
gen/srv/.cdsrc.json
gen/srv/package-lock.json
gen/srv/package.json
gen/srv/srv/_i18n/i18n.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.