The main intent of this scenario is to complement an existing business process in an SAP solution – currently SAP ECC (ERP Central Component) - with additional business process steps. This involves adding major logic and/or additional data and goes beyond simple UI changes.
Detailed steps of the S/4 HANA on premise Extension Scenario can be found here
This application showcases:
- Building application on SAP Business Technology platform using SAP Cloud Application Programming Model (CAP)
- Consuming Events from SAP ECC using SAP Event Mesh
- Consuming REST API's from SAP ECC using SAP BTP Connectivity Service
A business scenario is used to showcase how to build a SAP ECC extension Application.
As an employee of Business Partner Validation Firm iCredible, which is a third-party vendor of ACME Corporation, John would like to get notifications whenever new Business Partners are added in SAP ECC 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 SAP ECC system of ACME Corporation.
-
Custom extension application that works independently from SAP ECC
-
Changes in SAP ECC communicated via events in real time to extension application.
-
Compute intensive batch processing available on demand (serverless environment)
-
Vendor personnel needs access to only custom app
The Business Partner Validation application is developed using SAP Cloud Application programming Model (CAP) and runs on the SAP Business Technology platform, Cloud Foundry Environment. It consumes platform services like Event Mesh, SAP HANA and Connectivity. The events generated in SAP ECC are inserted into the Event Mesh queue. The application running in Cloud Foundry polls the queue for these messages and inserts them into the HANA database. It uses SAP ECC REST API's to read Business Partner Data from SAP ECC system. It also updates the address and removes central block on the Business Partner once verified.
- SAP ECC on premise system.
- SAP Business Technology platform account with Event Mesh service. The 'default' plan for Event Mesh service is required.
- Node js
- Cloud Foundry Command Line Interface (CLI)
- Visual Studio Code
- cds-dk
- SQLite
- To build the multi target application, we need the Cloud MTA Build tool, download the tool from here
- For Windows system, install 'MAKE' from https://sap.github.io/cloud-mta-build-tool/makefile/
Note: Please set the npm registry for @sap libraries using the command :
npm set @sap:registry=https://npm.sap.com
- multiapps plugin -
cf install-plugin multiapps
- mbt -
npm install -g mbt
The application requires below set of SAP Business Technology platform Entitlements/Quota
Service | Plan | Number of Instances |
---|---|---|
Event Mesh | default | 1 |
SAP HANA Schemas & HDI Containers | hdi-shared | 1 |
SAP HANA Cloud | hana | 1 |
Application Runtime | 3 |
The project contains below folders and files
File / Folder | Purpose |
---|---|
app/ |
content for UI frontends go here |
db/ |
your domain models and data go here |
srv/ |
your service models and code go here |
package.json |
project metadata and configuration |
readme.md |
this getting started guide |
- Open terminal in VSCode
- Run
cds watch
-
Build the application
mbt build -p=cf
-
Login to Cloud Foundry by typing the below commands on command prompt
cf api <api> cf login -u <username> -p <password>
api
- URL of the Cloud Foundry landscape that you are trying to connect to.Select the org and space when prompted to.
-
Deploy the application
Navigate to mta_archives folder and run the below command from CLI
cf deploy BusinessPartnerValidation_1.0.0.mtar
-
In the command line interface run the command
cf apps
-
Find the URL for the app
BusinessPartnerValidation-ui
- this is the launch URL for the Business Partner Validation application. -
Launch the URL in a browser.
-
Click on Business Partner Validation tile
- The list of Business Partners along with their verification status gets displayed.
- Login to the SAP ECC system
- Enter transaction code 'bp'
- Click on Person
-
Move to the status tab and check mark the 'Central Block' lock. Save the BP. This will create a new Business Partner
- Now go back to the BusinessPartnerValidation application to see if the new BusinessPartners has come on the UI
- Go to the details page for the new BusinessPartner. Click on edit.
- Change the Verification Status to VERIFIED. You can also edit the street name, postal code also if needed. Save the data.
- Open SAP ECC system, bp transaction. Search for the newly created bp
- Double click on the BP
- You can see that the central Block lock has been removed
- You can also notice that in the BusinessPartner Validation UI, the status is now set as COMPLETED.
No known issues.
In case you find a bug, or you need additional support, please open an issue here in GitHub.
Copyright (c) 2020 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.