Skip to Content
Technical Articles

Building Extensions for SAP S/4HANA Cloud using APIs and Events | Hands-on Video Tutorials

Philip Mugglestone from SAP Partner Innovation Lab and the SAP HANA Academy just released an update to the video tutorial series about building extensions for SAP SuccessFactors using APIs and events.

In this blog post you will find the videos embedded with references and additional information.

For the related blog posts, visit

Questions? Please post as comment.

Useful? Give us a like and share on social media.

Thanks!

/wp-content/uploads/2016/02/sapnwabline_885687.png

Hands-On Video Tutorials

What You Will Learn

Philip Mugglestone from the Partner Innovation Lab just released for the SAP HANA Academy an update to video tutorial series about building extensions for SAP S/4HANA Cloud using APIs and events.

You can watch the 12-part video tutorials in about 2 hours. What you learn is

  • How to register an SAP S/4HANA Cloud on the SAP Business Technology Platform
  • How to create an SAP S/4HANA Cloud Extensibility service instance that enables consumption of the S/4HANA Cloud API for sales orders.
  • How to create an SAP S/4HANA Cloud Extensibility service instance that enables consumption of S/4HANA Cloud events.
  • How to subscribe and create service instances for SAP Event Mesh, SAP Launchpad Service, SAP HANA Cloud, and SAP Business Application Studio.
  • How to use the uses a jumpstart generator to create an extension application based on SAP Cloud Application Programming Model (CAP), including configuration to create and access services used in the scenario.
  • About the role and function of the different parts of the extension application.
  • How to further extend the extension application.
  • How to optimise “local” development and testing.
  • How to undeploy the extension application and cleanup service instances, subscriptions and registrations that were created as part of this extension scenario.
  • How to configure a side-by-side extension application that uses the BusinessPartner API.

Architecture

The components used are

Prerequisites

Time of writing, this scenario requires a customer or partner global account for system landscape registration. Currently, this is not supported on the SAP BTP Trial environment.

To pair an SAP BTP global account with an SAP S/4HANA system requires administrator privileges.

Account assignments include

SAP HANA Academy YouTube Playlist

To bookmark the playlist on YouTube, go to

/wp-content/uploads/2016/02/sapnwabline_885687.png

Getting Started

In the first video, Philip demonstrates a simple scenario that shows how to extend SAP S/4HANA Cloud using APIs and events. Architecture is discussed as well as where to find reference material for services and technologies used in the scenario.

0:00 – Demonstration of the sample scenario

2:10 – Architecture

4:30 – Documentation on the SAP Help Portal 

6:00 – SAP API Business Hub

7:45 – API key

8:15 – Cloud Application Programming model 

References

/wp-content/uploads/2016/02/sapnwabline_885687.png

Register System

In the second video tutorial, Philip covers the registration process between SAP S/4HANA Cloud and SAP Business Technology Platform. We learn how to create a BTP sub-account, how to configure entitlements for services required by the scenario, subscribe to key services and configure the application development environment.

0:30 – Prerequisites: administrator privileges, entitlements and assignments

1:15 – Register System for token

2:15 – Maintain SAP BTP Extensions and add new extension with token

3:20 – Create subaccount and set entitlements, including SAP S/4HANA Cloud Extensibility

5:30 – Enable Cloud Foundry runtime and create space

/wp-content/uploads/2016/02/sapnwabline_885687.png

Consume APIs

In this tutorial, Philip shows how to create an SAP S/4HANA Cloud Extensibility service instance that enables consumption of the S/4HANA Cloud API for sales orders.

0:45 – Create SAP S/4HANA Cloud Extensibility service instance, api-access plan

2:00 – Communication scenario in SAP S/4HANA Cloud

2:30 – Communication scenario in SAP API Hub

3:00 – Configure instance with scenario ID 

3:45 – Documentation for JSON file properties

5:30 – Communication arrangement in SAP S/4HANA Cloud

References

/wp-content/uploads/2016/02/sapnwabline_885687.png

Consume Events

In this tutorial, Philip shows how to create an SAP S/4HANA Cloud Extensibility service instance that enables consumption of S/4HANA Cloud events.

0:30 – Create SAP S/4HANA Cloud Extensibility service instance, messaging plan

1:30 – emClientId documentation

3:20 – Configure instance with enterprise messaging client ID 

3:40 – Communication arrangement in SAP S/4HANA Cloud

4:20 – Enterprise Event Enablement 

5:00 – Create outbound topic for SalesOrder/Changed

References

/wp-content/uploads/2016/02/sapnwabline_885687.png

Subscriptions

In this tutorial, Philip subscribes to additional BTP services that form part of the scenario – including SAP Event Mesh, SAP Launchpad, SAP HANA Cloud, and SAP Business Application Studio.

0:00 – Introduction

0:45 – Create service instance for Event Mesh service with standard plan

1:30 – Assign Enterprise Messaging role collection to user

2:30 – SAP Event Mesh Message Client

3:45 – Create service instance for Launchpad Service service with standard plan (Subscription) 

4:20 – Create subscription for SAP Business Application Studio

4:30 – Assign Business Application Studio and Launchpad role collection(s) to user

6:00 – Create service instance for SAP HANA Cloud

/wp-content/uploads/2016/02/sapnwabline_885687.png

Create Extension App

In this tutorial, Philip uses the jumpstart generator to create an extension application based on SAP Cloud Application Programming Model (CAP) including configuration to create and access services used in the scenario.

0:00 – Introduction

0:40 – Create Dev Space for SAP Cloud Business Application in SAP Business Application Studio

2:00 – Install SAP Partner Engineering extension

3:00 – Install SAP HANA Academy yeoman generators

3:30 – Start SAP HANA Academy CAP generator

5:00 – Copy API key from SAP API Business Hub 

8:15 – Generate project

/wp-content/uploads/2016/02/sapnwabline_885687.png

Review Extension App

In this tutorial, Philip reviews the extension application generated in the previous tutorial and performs some simple local testing.

0:00 – Introduction

0:30 – MTA and CDS code walkthrough – mta.yaml

2:00 – package.json

3:45 – xs-security.json 

4:00 – db and srv modules and catalog service

8:15 – API key

9:00 – app module with html5 and fiori

9:45 – test.http for local testing

10:30 – cds watch

Commands

cds watch

/wp-content/uploads/2016/02/sapnwabline_885687.png

Deploy Extension App

In this tutorial, Philip adapts, builds, deploys, and tests the extension application.

0:00 – Introduction

1:00 – Configure package.json for destination

1:45 – Configure mta.yaml 

2:30 – Review em.json

3:00 – Review catalog-service.js

3:45 – Build and deploy MTA application to the Cloud Foundry space

5:00 – Review application and services in SAP BTP Cockpit

5:45 – Assign role collection

6:30 – New message client in SAP Event Mesh with queue

7:45 – Create site and add HTML5 app(s) using Launchpad Site Manager

9:30 – Change sales order (VA02) in SAP S/4HANA Cloud

10:30 – Review queue in SAP Event Mesh

/wp-content/uploads/2016/02/sapnwabline_885687.png

Ongoing Development

In this tutorial, Philip discusses how to further extend the extension application.

0:00 – Introduction

0:30 – About catalog-service.cds

3:15 – About data model.cds

4:00 – About the UI, Fiori elements, and annotations.cds

5:45 – About events and em.json

7:00 – API key

8:45 – CDS Graphical Modeler

/wp-content/uploads/2016/02/sapnwabline_885687.png

Local Development

In this tutorial, Philip shows how to optimise “local” development and testing.

0:00 – Introduction

1:00 – Run configurations

1:30 – Install CF DefaultEnv plugin and run command cf de [application name]-[module]

2:30 – VCAP_SERVICES written to default-env.json

3:00 – CDS_ENV=production cds watch

4:45 – Connect to SAP HANA with a bind to the HDI container to deploy changes

Commands

cf de [application name]-[module]
CDS_ENV=production cds watch

/wp-content/uploads/2016/02/sapnwabline_885687.png

Cleanup

In this tutorial, Philip shows how to undeploy the extension application and cleanup service instances, subscriptions and registrations that were created as part of this extension scenario.

0:00 – Introduction

1:00 – Remove Fiori application 

2:15 – Undeploy Cloud Foundry application using command the cf undeploy

3:45 – Delete Launchpad Service subscription

4:30 – Delete Dev Space in SAP Business Application Studio

4:45 – Delete SAP Business Application Studio subscription

5:00 – Delete SAP HANA Cloud

5:15 – Delete outbound topic from SAP S/4HANA Cloud Enterprise Event Enablement

5:30 – Delete SAP Event Mesh messaging service instance

5:50 – Delete SAP Event Mesh api-access service instance

6:45 – Delete SAP Event Mesh standard subscription

7:15 – Delete subaccount destinations

7:30 – Delete Cloud Foundry subaccount

7:45 – Delete entitlements

8:10 – Create service ticket to delete global account system registration 

Commands

cf undeploy --delete-services --delete-service-keys -f

/wp-content/uploads/2016/02/sapnwabline_885687.png

BusinessPartner API

In this tutorial, Philip shows shows how to configure a side-by-side extension application that uses the BusinessPartner API.

0:00 – Introduction

1:30 – Create new service instance for SAP S/4HANA Cloud Extensibility, api-access plan

2:10 – Sample JSON configuration for scenario SAP_COM_0008

3:15 – Create outbound topic for BusinessPartner event

4:00 – Build application using SAP S/4HANA Cloud Business Partner (A2X) API

5:45 – SAP Cloud SDK

6:20 – Update destination in package.json

6:45 – Update destination in mta.yaml

7:30 – BusinessPartner API code walkthrough

10:30 – Build and deploy

10:45 – Review SAP Event Mesh

11:15 – Configure SAP Fiori Launchpad

12:30 – Validate scenario

/wp-content/uploads/2016/02/sapnwabline_885687.png

Additional Resources 

SAP Help Portal

For the documentation, go to

SAP API Business Hub

Visit the SAP API Business Hub for more information about the business process. You can try the API out on a sandbox system and download an API key for testing.

The entry also references the business documentation

openSAP

For additional (free) training on the components used, enrol

SAP Discovery Center

For information about the different services that comprise the SAP Extension Suite and to embark on a mission, visit the SAP Discovery Center.

SAP Community

For blogs posts, questions and answers, and other community resources, visit

/wp-content/uploads/2016/02/sapnwabline_885687.png

Share and Connect 

Questions? Post as comment.

Useful? Give us a like and share on social media. Thanks!

If you would like to receive updates, connect with me on

Be the first to leave a comment
You must be Logged on to comment or reply to a post.