Skip to Content
Technical Articles
Author's profile photo Denys van Kempen

Getting Started with ABAP in the Cloud – Hands-On

With this blog we provide an update about the latest information on getting started with the ABAP environment on the SAP Cloud Platform.

  • Part I provides an introduction with an overview of the available resources.
  • Part II covers a series of hands-on tutorials recently published on the SAP HANA Academy YouTube channel.

Any good? Post a comment, share on social media, and/or give a like. Thanks!

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

Hands-On Video Tutorials

Philip MUGGLESTONE just published a video tutorial series about getting started with SAP Cloud Platform ABAP Environment. For his blog post on the topic, see Hands-on Video Tutorials for SAP Cloud Platform ABAP Environment.

Below, we have embedded the videos with some additional information for ease of viewing. Following along you will learn how to build an app for travel bookings. We will be using Fiori Elements so we do not have to write any of the user interface code ourselves. Very convenient.

Watching the nine video tutorials will cost you a little over an hour of your time. What you get back is

  • a good understanding of how you can work with ABAP in the cloud
  • some differences between the free trial and the enterprise account and how to set it up
  • how to connect client tools (Eclipse) to the cloud instance with service keys
  • the basics of the ABAP RESTful Programming model
    • how to create a project, packages, and persistence
    • how to create an interface view, projection view, service and behaviour definitions

Difficult? Not at all. Code snippets are provided so you can relax.

To bookmark the playlist on YouTube, go to > SAP Cloud Platform ABAP Environment

For the code snippets, go to > github.com/saphanaacademy/ABAP

YouTube Tutorial Videos

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

1. Overview

The first video provides an overview showing the travel bookings app, the tools used, and the ABAP environment on the SAP Cloud Platform (SCP).

For the tutorial series the free trial environment is used so everybody can follow along. With a customer account this works the same way except that you would have to install the ABAP Platform Flight Reference Scenario yourself (it is included in the trial).

For some additional reading, see

In particular, the programming model guide is recommended as this will explain the concepts.

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

2. Getting Started with a Customer Account

In the second tutorial, we learn how we can set up an environment in a SCP global account and check the service entitlements for the ABAP service.

New in SCP are recipes for service provisioning. What this means is that instead of you having to create subaccounts, Cloud Foundry spaces, configure entitlements, assign members, etc., the system will do this for you. The recipe used is Prepare an account for ABAP Development.

Next, we create a subaccount for the Steampunk environment. Using the ABAP dashboard, we then create business roles from the template SAP_BR_DEVELOPER, and create a business user.

We also create a service key so we can connect our client tool (below) to the cloud instance.

For the documentation, see

 

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

3. Getting Started with a Trial Account

The third tutorial covers the same topic, except now we are setting up the environment for the free trial account. This is even easier. All you need to do is to select a region: US East or Europe and subsequently a trial subaccount will be setup in the Cloud Foundry environment with an org and a space, service assignment and subaccount entitlement for the ABAP Trial, and finally how to create an instance of the ABAP Trial itself: access a shared instance to build custom ABAP cloud apps, leveraging newest innovations powered by SAP HANA. Nothing less.

As in the previous video, we also need to create a service key.

For the documentation, see

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

4. Configure ABAP Development Tools

With the server-side up and running, we now turn our attention the client side. The steps are the same regardless whether you are working with a trial or customer account.

We will be using Eclipse (2019-12) and need to install the ABAP Development Tools from the SAP Development Tools website tools.hana.ondemand.com/#abap. Here we also find the documentation.

Both Microsoft Windows and macOS are supported. Recommended Java VM is the yellow SapMachine, the OpenJDK release maintained and supported by SAP, which you can download from sap.github.io/SapMachine.

This would be a good time to take a coffee break.

 

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

5. Create ABAP Cloud Project

With our environment configured, we can now start our project. The system connection is made using the service key created in videos 2 and 3.

As mentioned, we will be working with the trial account to make use of the pre-configured ABAP Platform Flight Reference Scenario (SFLIGHT). On a customers environment you will need to set this up yourself.

 

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

6. Create Package and Persistence (Table)

With our connection established, we proceed with creating a package and a table along with an ABAP class to populate the table with data (one row).

In the trial, the environment is shared so all names need to be unique. Replace XXX in the sample code with your favourite number. Spoiler alert: Philip already picked 007.

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

7. Create Data Model and OData Service

Now we get to the core of ABAP RESTful Programming by creating an interface view (Core Data Services > Data Definition). This is the first layer of data modeling: how do you want to work with the physical tables in different scenarios?

Interface View

Next, we create the projection view (fka consumption view), built on top of the interface view defining how the UI should be configured (@UI annotations).

Projection View

We also create a new service definition for the projection view with a service binding to OData v2. The OData service is previewed using Fiori Elements.

Service Definition

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

8. Create Behavior Definitions

We are getting more and more sophisticated by creating a new behavior definition on the interface view with a new behaviour implementation on top, and add a new behavior definition on the consumption view. This enables us to edit fields in the web UI and create new records, a.k.a. CRUD (Create Read Update Delete) operations.

Behavior Definition

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

9. Extend Behavior Definitions

Finally, cherry-on-the-pie, you will learn how to extend behavior definitions in order to further enhance application functionality by enabling a custom action (confirm booking) and validation (e.g. end date after begin date).

Custom action

Validation

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

Share and Connect

Questions? Please 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

For the author page of SAP PRESS, visit

Over the years, for the SAP HANA Academy, SAP’s Partner Innovation Lab, and à titre personnel, I have written a little over 300 posts here for the SAP Community. Some articles only reached a few readers. Others attracted quite a few more.

For your reading pleasure and convenience, here is a curated list of posts which somehow managed to pass the 10k-view mile stone and, as sign of current interest, still tickle the counters each month.

/wp-content/uploads/2016/02/sapnwabline_885687.pngv>

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mukesh Kumar
      Mukesh Kumar

      Thanks Denys van Kempen, for caring to share 🙂 The Hands-On Video Tutorials on HANA Academy is very helpful. Came to know about it from your blog post.

      Author's profile photo Wei Li
      Wei Li

      hi, Denys:

      Love this hands-on, very straightforward. I have a  question on ABAP cloud. Is it possible to to use ABAP cloud to build multi-tenancy business application? Currently I could see only Java or Node.js example. We want to reuse our ABAP code in cloud.

       

      Wei

      Author's profile photo Denys van Kempen
      Denys van Kempen
      Blog Post Author

      Hi Wei,

      The original SAP Cloud Platform Neo (NetWeaver Cloud) environment started with Java and HTML5 back in 2012. The Cloud Foundry environment added in 2017 includes generic buildpacks for Java, Node.js, Ruby, .NET, Go, Python, PHP, Nginx, and R, and some specific SAP Java buildpacks. 

      For most tutorials, Java and Node.js are used but there are alternatives.

      The ABAP environment is hosted in Cloud Foundry and can serve as a runtime for ABAP applications. Does this answer your question?

      Author's profile photo Wei Li
      Wei Li

      Hi, Denys:

      Thanks for quick response. My question is regarding how to use ABAP cloud to implement business application to support multi-tenancy. I did see lots of example on Java and Node.js. But nothing on ABAP side, is it even possible?

      From buildpacks list, there is no ABAP support, I couldn't find SDK support from SAP cloud SDK as well. We have already built on-premise solution and plan to move it into cloud, If ABAP is not supported, we will need to find alternatives.

       

      Wei

      Author's profile photo F A
      F A

      Hi Denys van Kempen

       

      Great blog , thank you .

      Quick question for the enterprise account that is needed to set up the ABAP Environment does one need to be a partner or can this be done another way . Our trial account works well , but there isnt a way to convert this to a fully paid model , so just wondering how can this be done ?

      many thanks

       

      Author's profile photo Surendra Polamreddy
      Surendra Polamreddy

      Thanks for Sharing

      Very Good Article ,

      Author's profile photo Jeff Albert
      Jeff Albert

      Great blog. Easy to follow through. Awesome to learn how simple it is to get Eclipse and Fiori up and running.

      Author's profile photo Former Member
      Former Member

      Thanks for this article, however eclipse ADT tools in terms of functionality, smoothness and stability is very unsuitable and is frustrating.

      Another point I am curious is that customer adoption is low or not being discussed. What's the future roadmap and how many customers have picked it. Also what happened to the app Store ?