Skip to Content
Technical Articles

Getting Started with ABAP in the Cloud – Part II

SAP Cloud Platform ABAP Environment

With this blog we provide an update about the latest information on getting started with the ABAP environment on the SAP Cloud Platform. In Part I we listed the different information sources available. In part two, we focus on the tutorial series recently published on the SAP HANA Academy YouTube channel.

Any good? Post a comment, share on social media, and/or give a like. That’s how the community works. 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

Learned Something New?  

Post a comment, share on social media, and/or give a like. That’s how the community works. Thanks.

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

Best,

Denys van Kempen

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

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