Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

ABAP IN THE CLOUD

Hi and welcome to our openSAP course, Introduction to ABAP in the Cloud. My name is Quincy

Anderson and I'm an instructor in the SAP Product Learning Organization. This is unit one, Basic

Concepts of SAP Business Technology Platform. Let's begin by looking at all the units we will be covering

this week. 00:00:29 We start with unit one, basic concepts. And then from there we go to unit two

00:00:33 and we learn about what is the ABAP platform cloud environment. From there, in unit three,

00:00:38 we take a look at the ABAP RESTful Programming Model. Next in unit four, 00:00:43 we take a

look at the Extension Suite. In unit five, we look at extension possibilities 00:00:48 with Service

consumption. And finally, in unit six, 00:00:52 we see a demo on how to create side-by-side extensions.

With that, let's get started. 00:01:02 So our first question is, what exactly is

? 00:01:07 Which we call BTP for short. Well, first and foremost, it is a platform. 00:01:13 So what does

that mean? Well, we as developers, 00:01:16 we need a platform to develop our applications. Our

applications are used by end users, 00:01:22 and that's where value is created. So BTP in the end is all

about creating value. 00:01:28 It does that by offering an integrated portfolio of tools, services, and

environments 00:01:33 designed around four areas of capability. First is database and data

management. 00:01:40 You are familiar with one of BTP's offerings in this area, SAP HANA Cloud.

00:01:46 Second is application development and integration. This is the area where ABAP resides.

00:01:53 Third is analytics. One product in this area is SAP Analytics Cloud. 00:01:59 And finally, BTP has

an intelligent technologies area, which has, for example, machine learning 00:02:05 and artificial

intelligence. As the saying goes, 00:02:09 the whole is greater than the sum of its parts. A complete

integrated portfolio of technological innovations 00:02:16 allows us as developers to turn data into

business value, compose end-to-end processes, 00:02:23 and to build and extend SAP applications

quickly and easily. 00:02:28 BTP functionality is made available to us as developers through a concept

known as an account. 00:02:35 There are two layers of accounts, global accounts and subaccounts.

00:02:40 Global accounts represent the contractual relationship between the organizations that we

work for and SAP. 00:02:47 It is within global accounts that entitlements to functionality and quotas

related to compute, memory, and other things are set. 00:02:56 Those entitlements and quotas are then
allocated to one or more subaccounts, 00:03:00 and it is at that level that we as developers will work.

That brings us to our screenshot here, where we see the SAP BTP cockpit 00:03:10 showing a

subaccount named trial. The cockpit allows us to access and to manage 00:03:15 BTP functionality. If

you take a look at bullet point one, 2 00:03:20 it shows the landscape that the subaccount is located in,

namely the trial home landscape, 00:03:25 which is a cloud data center located in the central European

region. Bullet point two shows the identifier of the global account, 00:03:34 and bullet point three

shows the ID of the subaccount, which is trial in this case. 00:03:39 Bullet points four and five show two

environments that have been enabled in our subaccount. 00:03:44 There are a total of four runtime

environments. One, Cloud Foundry. 00:03:49 Two, ABAP. Three, Kyma. 00:03:54 And four, Serverless

Functions or Serverless. Four shows relevant information for Cloud Foundry, 00:04:02 and five likewise

for Kyma. ABAP and Serverless are not visible 00:04:07 in this portion of the cockpit, but are located in

different areas. 00:04:12 Now, if you look over to the left, we see various administrative and

maintenance functionality 00:04:16 possible for subaccounts, such as security, where users can be

maintained, 00:04:21 connectivity, which can be used to set up connections to external systems,

00:04:25 and usage analytics for reporting. One particular maintenance feature 00:04:31 that I would

like to bring to your attention is the Service Marketplace, 00:04:35 where all possible BTP tools, services,

and runtimes that you can utilize are listed. 00:04:42 If you decide to utilize a particular tool, service, or

runtime, 00:04:46 you create an instance which will then be visible in the link you see under Service

Marketplace, 00:04:50 entitled instances and subscriptions. Speaking of tools, 00:04:59 services, and

environments provided by BTP, there is another location you can go to 00:05:03 if you would like to

browse them. Maybe, for example, you would like to get more information 00:05:08 before you make

your purchase. If so, you can go to the SAP Discovery Center 00:05:13 located at https://discovery-

center.cloud.sap. Here you can see a list of all services, 00:05:23 filter them by their type, and get links

to resources and tutorials 00:05:28 to try them out. So before we start to look at the specifics 00:05:35

of the ABAP environment, we want to see where it fits in the larger scheme of things. 00:05:40 You

recall that we mentioned at the beginning that one of the areas of capability for BTP 00:05:44 is

application development and integration. Looking at this screen, 00:05:49 we see the specific offerings
in this area. Starting from the top, we see business services, 00:05:55 applications, and extensions that

provide value and that we as developers 00:06:00 are called upon to create. The creation of that value is

done 00:06:05 by using a variety of services. The services related to application development 00:06:10

are bundled together as extension services, and the ones related to application integration 00:06:15 are

bundled together as integration services, which we see on the right hand 00:06:20 and the left hand,

respectively. Sometimes extension services is referred to 00:06:26 as the Extension Suite, and likewise,

integration services 00:06:30 are referred to as the Integration Suite. Moving one layer lower, we see

four categories 00:06:36 of support services for applications, namely security services 00:06:42 for

things such as authentication and authorization that our apps may require. 00:06:46 Application

services, when our apps need connection destinations to external systems 00:06:51 and when they need

metering services. Observability services, 00:06:55 if our apps need to trigger alerts in the case of an

error or write information to a log file to help support 00:07:01 to resolve service tickets. And finally,

backing services for external resources, 00:07:06 such as a remote database that apps may need to

access. 3 00:07:11 The next layer is foundation services, which are provided by BTP, 00:07:15 to

facilitate purchasing and provisioning of services, as well as account enablement and management.

00:07:22 Also at this layer are the four runtime environments, consisting of Cloud Foundry, 00:07:27

ABAP, Kyma and Serverless. The final layers deal with low-level network services 00:07:34 that apps

need to communicate to other resources, as well as to provide a means to be communicated with.

00:07:39 Your Fiori applications, for example, are accessible via a URL that an end user can put in a

browser. 00:07:46 Finally, for apps that run directly or indirectly in a container, 00:07:50 a container

orchestration engine is needed, which is provided by Kubernetes. 00:07:55 It is important to understand

that everything that you see here is used to support you 00:07:58 as developers in your application

development and to support the apps that you will ultimately develop 00:08:03 when they are deployed

and are being used. It is also important to know 00:08:08 that what you see on the current screen is

currently referred to, sometimes, 00:08:12 as Platform as a Service, or PaaS. The reason that is

important is because of the next screen. 00:08:23 What you see on this screen is commonly referred to

as Infrastructure as a Service or IaaS. 00:08:29 This layer contains the compute, memory, storage, and
network functionality 00:08:33 that both actual and virtualized that apps need. To enable customer

choice, the IaaS layer 00:08:39 is normally offered and managed by our IaaS partners, namely Amazon,

Google, and Microsoft. 00:08:45 We as SAP take responsibility for the offering and management of the

BTP or the PaaS layer. 00:08:52 As a result, when you set up a new subaccount, you must choose an IaaS

partner 00:08:56 along with a geographic region, which contains a data center 00:09:00 where that

subaccount will be located. Okay, we made it. 00:09:05 In our next unit, we will look in detail at the SAP

BTP ABAP runtime environment. 00:09:10 See you there. 4 Unit 2 00:00:05 Hi, and welcome to our

openSAP course, Introduction to ABAP in the Cloud. 00:00:10 My name is Quincy Anderson and I am an

instructor in the SAP Product Learning Organization. 00:00:15 This is unit two, Introduction to SAP BTP,

ABAP environment. Before we begin, a quick recap of unit one, 00:00:24 Basic Concepts of SAP Business

Technology Platform. In unit one, we learned that BTP 00:00:30 is an integrated portfolio of tools,

services, and environments designed around four areas of capability. 00:00:38 Number one, database

and data management. Two, application development and integration. 00:00:45 Three, analytics, and

four intelligent technologies. Furthermore, we saw that BTP, ABAP environment 00:00:55 is one of the

four cloud-based runtime environments offered as part of the application development and integration

area. 00:01:03 Lastly, we learned that as developers, we can create value to our organizations 00:01:08

by utilizing the BTP, ABAP environment to create business services, applications, and extensions.

00:01:16 With that, let's get started. What we see here on this screen is SAP's vision 00:01:25 of the

Intelligent Enterprise. As always, the creation of value for you, 00:01:31 our customers, is front and

center of what we do. So how is value created here? 00:01:36 First, we see in bullet point one, the

intelligent suite. The intelligent suite comprises the complete scope 00:01:43 of functional offerings the

SAP portfolio provides. For example, in the customer experience area, 00:01:48 we have SAP Sales

Cloud. In the network and spend management area we have Ariba. 00:01:54 In the digital core area, we

have SAP S/4HANA. Bullet points two and three comprise the BTP portfolio - 00:02:03 intelligent

technology, such as machine learning and artificial intelligence in regards to bullet point two, 00:02:08

and database and data management, as well as application development and integration 00:02:12 in

regards to bullet point three. As we said in unit one, 00:02:16 the whole is greater than the sum of its
parts. When you take the intelligent suite along with BTP, 00:02:23 value is created for our customers by

being able to implement complete end-to-end processes, 00:02:28 such as lead-to-cash, recruit-to-

retire, and procure-to-pay. So as mentioned earlier, 00:02:40 the BTP, ABAP environment allows us as

developers to create value by building business services, applications 00:02:48 and extensions. On this

screen, we see how BTP, ABAP environment 00:02:53 and SAP S/4HANA come together in regards to

extension development. 00:02:58 Now, first, what exactly is an extension? Well, that's super easy to

understand. 00:03:04 An extension simply adds additional features and additional functionality.

00:03:09 With SAP S/4HANA, extensions can be implemented in two ways: in-app extensions, which we

see on the left, 00:03:17 and side-by-side extensions, which we see on the right. In-app extensions are

done directly in SAP S/4HANA 00:03:25 using specific tools dedicated for this purpose. In-app extensions

are simple, easy, 00:03:32 and non-disruptive in their scope, and are typically done by key users 5

00:03:36 in the business department, as opposed to developers in the IT department. 00:03:42 There

are several types of in-app extensions that can be done. 00:03:45 New fields can be created, new

business logic can be implemented, 00:03:50 UI adaptations can be done also. Extensions that are much

larger in their scope 00:03:58 involving complex business logic, extensive UI design and development,

00:04:02 and needing code checks, testing, and debugging, are done using side-by-side extensions.

00:04:10 Side-by-side extensions are implemented and run on BTP and are decoupled from S/4HANA.

00:04:16 Several tools, services, and runtimes can be utilized, such as SAP HANA for building the

database logic, 00:04:22 BTP, ABAP environment utilizing the ABAP RESTful Programming Model

00:04:26 for building the application logic, and Business Application Studio for building the UI logic.

00:04:33 So since BTP, ABAP environment is necessary to implement side-by-side extensions, 00:04:38

let's take a deeper look at it now. So what exactly is BTP, ABAP environment? 00:04:44 Well, that's super

easy also. BTP, ABAP environment allows us as developers 00:04:49 to build and run ABAP code in the

cloud. It's cloud-optimized and based on an SAP HANA instance. 00:04:57 If you want to think of it as an

ABAP Platform as a Service, PaaS, that's fine, feel free to do so. 00:05:05 It runs through Cloud Foundry

and is managed using the BTP cockpit. 00:05:11 Development work is done using Eclipse and the ABAP

Developer Tools plugin. 00:05:17 Both side-by-side extension development, as well as new application
development, is possible. 00:05:27 Now, many of you, when you think of ABAP, you think of classic

ABAP used in our on-premise products. 00:05:33 However, the addition of BTP, ABAP environment

requires some new terminology that we have to learn. 00:05:40 There are now two versions of ABAP.

The first version is ABAP classic. 00:05:44 ABAP classic is used in our on-premise products, including SAP

S/4HANA on-premise. 00:05:51 The second version is ABAP strict. ABAP strict is used in both BTP, ABAP

environment 00:05:58 and in addition, SAP S/4HANA Cloud, ABAP environment. ABAP strict has three

rules that differ from classic ABAP, 00:06:07 which brings us to our current screen. One, access to

repository objects is governed 00:06:14 by a list of released APIs that is checked statically at compile

time, as well as during runtime. 00:06:23 Two, only ABAP Development Tools, ADT, as part of the Eclipse

platform, 00:06:30 can be used as your development tool. SAP GUI cannot be used. 00:06:35 And finally,

three, the ABAP language keyword set is restricted as compared to ABAP classic. 00:06:44 Almost all

obsolete keywords are disallowed, and stricter syntax rules and checks 00:06:51 are applied to all

elements, including ABAP classes and ABAP SQL. 00:07:00 On this screen, we see a few examples of the

restrictions in ABAP strict. 00:07:05 First, secondary database connections are not allowed. So the

relative keywords are not supported 00:07:10 and will result in a syntax error if used. Likewise for

dynamic connections, client overrides, 00:07:17 and select for update. There are two landscapes for

BTP, ABAP environment, 00:07:26 which are factory and trial. Factory is licensed for development and

production purposes, 00:07:33 whereas trial is free and is used more for learning and ramping up,

00:07:37 sort of a "try before you buy" scenario. In the factory landscape, 6 00:07:42 there are several

licensing options available, Enterprise Agreement and Pay-As-You-Go. 00:07:49 As the trial landscape is

available free of charge, no licensing agreement is needed. 00:07:57 In both landscapes, your BTP, ABAP

environment instance, which is known as ABAP service instance, 00:08:03 is set up in a Cloud Foundry

space, which is part of the Cloud Foundry environment 00:08:07 in a subaccount. Users can then be

maintained to log on 00:08:11 to an ABAP service instance. These users can be a BTP user, subaccount

user, 00:08:17 space user, employee, or a business user. On this screen, we see the global account,

subaccount, 00:08:30 space, and ABAP service instance that has been enabled. This example is in the

trial landscape. 00:08:39 In the top left-hand corner, we see trial home, which is the landscape. 00:08:43
The global account is located immediately to the right, and the subaccount, which is named trial, is last.

00:08:51 Looking below that in the middle of the screen, you see an ABAP service instance that has been

enabled 00:08:56 within the dev space, which is part of the Cloud Foundry runtime environment.

00:09:07 To create an account in the trial landscape, you can go to

https://cockpit.hanatrial.ondemand.com, 00:09:16 as you see on this screen. You will need an e-mail

address and a phone number 00:09:20 not already associated with another BTP account. As part of BTP

account creation, 00:09:26 the e-mail address used will become a default user of the account, and can

be used to log on to the ABAP service instance. 00:09:38 Additional users can be created as you see here

on this screen. 00:09:46 As mentioned earlier, one of the characteristics of BTP, ABAP environment

00:09:50 is that development work is done using Eclipse with the ABAP Development Tools plugin

known as ADT. 00:09:57 When connecting to your ABAP service instance using ADT for the first time,

you will choose SAP BTP, ABAP environment, 00:10:04 as shown on the screen to your left. Afterwards,

you will put in the unique API endpoint 00:10:10 of the region, your BTP account, along with the e-mail

address and password of any BTP user 00:10:16 associated with the BTP account, as shown in the

middle. After successfully authenticating 00:10:23 the relevant Cloud Foundry and ABAP service instance

information appears as shown in the last box 00:10:28 in the lower right-hand corner. Many of you are

accustomed to using the ABAP Workbench 00:10:37 to do your development work. However, as

mentioned earlier with BTP, ABAP environment, 00:10:42 ADT is used to perform your development

tasks. ADT contains everything you need to support full lifecycle 00:10:50 end-to-end development.

Both Eclipse, and in addition ADT, can be downloaded 00:10:55 from https://tools.hana.ondemand.com

as you see in the bottom right-hand corner. 00:11:08 ADT can be upgraded separately from Eclipse

itself. The latest version is 3.20. 00:11:15 As with all software products, each version will have

enhancements and new features. 00:11:21 The next few slides show some of those enhancements and

features that have shipped with new releases of ADT. 00:11:27 over the years. On this screen, we see

with releases 2.51 and 2.64, 00:11:35 corresponding to ABAP platform release 7.50, we have a new

source-based structure editor, 00:11:42 and enhanced Core Data Services tool support editor, an AMDP

debugger, 7 00:11:48 and a business object as well as Web Dynpro editor. For ADT 2.68 and 2.73,
corresponding to ABAP platform 7.51, 00:12:04 we have a form-based domain editor, redesigned

Project Explorer, 00:12:09 more enhancements to the CDS editor, and enhanced breadcrumb usage.

00:12:15 Breadcrumbs are very useful navigational aids when you are traversing several levels 00:12:22

of your development artifacts. They help you see the structural relationships 00:12:26 between different

artifacts. For ABAP platform 7.52, we have a redesigned table editor, 00:12:36 a package editor, and the

ability to directly run ABAP programs 00:12:39 and see output in the console. For ABAP platform 7.53, as

developers, 00:12:48 we can implement enhancements and modifications and use the runtime analyzer

to analyze errors. 00:12:57 Finally, and also for ABAP platform 7.53, we can create and edit lock objects,

00:13:03 as well as both see and edit ABAP transport requests. To conclude unit two, 00:13:13 we will

take a look at four sample scenarios where BTP, ABAP environment can be utilized. 00:13:20 In this first

scenario, we see that an external HTTP service, 00:13:24 which is providing some data or some

functionality is required. 00:13:29 Note that the BTP, ABAP environment is using the identity service and

the destination service 00:13:35 for authentication and connectivity respectively. Here we can really see

the benefits 00:13:41 of an integrated platform. Tools, services, and runtimes working together 00:13:47

for your application development. In this second scenario, 00:13:54 the ABAP Development Tools plugin

for ABAP RESTful, which we see on the right, 00:13:59 and an Eclipse plugin, which we see on the left,

00:14:02 which is the front end to access that functionality. Again, the plugin is done in Eclipse 00:14:09

via ABAP Development Tools. This functionality allows us as developers 00:14:14 to convert our ABAP

code and other artifacts into a format where they can be added to a Git repository. 00:14:21 Once done,

all Git operations such as pull, push, fetch, and so on, can be utilized. 00:14:33 In this third scenario, we

see a side-by-side extension developed using BTP, ABAP environment. 00:14:39 The SAP S/4HANA Cloud

system is on the right, and it has business data exposed as an OData API. 00:14:47 And BTP, ABAP

environment, depicted on the left, uses the destination service to make calls to that API. 00:14:56 In

addition, any needed operations can be executed against that API, 00:15:00 such as creating, reading, or

updating the data. A UI5-based application can also be created 00:15:08 that can execute on a phone or

a tablet. Optionally, the SAP Fiori launchpad service 00:15:14 can be used to expose that application to

end users. Again, make note of the tool ADT, 00:15:21 the runtime, BTP, ABAP environment, various
services, 00:15:26 such as the destination service and the SAP Fiori launchpad service, 00:15:32 all

working together to make this scenario possible. Finally, we see on our last screen, 00:15:40 a similar

scenario as to the previous screen, with the difference that, instead of an SAP S/4HANA Cloud instance,

00:15:47 instead on the right-hand side, we see an SAP S/4HANA on-premise instance. 00:15:52 This

shows the flexibility of BTP, where it doesn't matter what products in the intelligent suite you were

using. 00:15:59 BTP enables complete application development and integration capabilities. 00:16:05

Okay, so that concludes unit two, Introduction to BTP, ABAP environment. 8 00:16:11 In unit three, we

will take a deep dive into the ABAP RESTful Programming Model 00:16:17 See you there. 9 Unit 3

00:00:05 Hi, and welcome to our openSAP course Introduction to ABAP in the Cloud. 00:00:10 My name

is Quincy Anderson and I am an instructor in the SAP Product Learning Organization. 00:00:15 This is unit

three, ABAP RESTful Programming Model. Before we begin, a quick recap of unit two, 00:00:22

Introduction to SAP BTP, ABAP. In unit two, we learned about SAP's vision 00:00:27 of the Intelligent

Enterprise and how the Intelligent Enterprise, 00:00:30 along with the Business Technology Platform,

creates value for our customers. 00:00:35 We learned what BTP, ABAP environment is and how to

enable it in a subaccount. 00:00:39 We also learned about the different extension types and how BTP,

ABAP environment can help us create 00:00:44 side-by-side extensions, as well as other possible

scenarios we can implement 00:00:48 using BTP, ABAP environment. With that, let's get started.

00:00:58 On this screen, we will do a brief summary of the three different programming models that,

00:01:02 as developers, we have been able to utilize over the years. The first is classic ABAP

programming. 00:01:08 Many of you are familiar with that programming paradigm. From function

modules to screens, to subroutines, 00:01:14 for example, this model has been used for years by our

customers. 00:01:18 However, times change and new needs arise, which necessitates the development

of new approaches. 00:01:25 With the emergence of mobile devices, such as phones and tablets,

00:01:29 as well as the proliferation of cloud deployments, we, here at SAP, realized that new paradigms

were necessary. 00:01:40 As a first step, the ABAP Programming Model for SAP Fiori was released with

ABAP platform 00:01:46 release 7.50, SP01. It was then that we were introduced to some new types

00:01:53 of artifacts that we could create in our development efforts, 00:01:56 such as Core Data
Services, also known as CDS, and Business Object Processing Framework, 00:02:03 also known as BOPF.

We learned about what an OData service was 00:02:08 and how transaction code SEGW could be used

to create OData endpoints using familiar ABAP technologies, 00:02:14 such as remote-enabled function

modules and ABAP classes. While these technologies and approaches were modern and proven,

00:02:22 nevertheless, there were some issues. One particular issue was with the brownfield scenario,

00:02:28 where customers already had existing legacy code, which provided very detailed and granular

business logic. 00:02:35 As a result, developers, instead of needing to create new artifacts, instead, they

needed to reference 00:02:40 existing artifacts in a non-disruptive manner. In addition, the continued

evolution of the ABAP platform, 00:02:48 particularly BTP, ABAP environment, as well as SAP S/4HANA,

necessitated continued evolution 00:02:56 of the ABAP development paradigm. So, that brings us to our

current programming model, 00:03:04 known as ABAP RESTful Programming Model, or RAP. The ABAP

RESTful Programming Model was introduced 10 00:03:10 with BTP, ABAP environment, and also with

SAP S/4HANA Cloud, 00:03:14 starting with edition 1909. ABAP RESTful Programming Model evolves

00:03:20 the ABAP programming model for SAP Fiori in several ways. First, SAP GUI is not necessary.

00:03:27 All programming tasks are done using Eclipse with the ABAP Developer Tools plugin, 00:03:32

which we first saw in unit two. Second, the artifacts that must be developed 00:03:38 and the sequence

and flow to develop them is simple and intuitive, 00:03:41 leading to a smooth development process

and a very fast ramp-up for developers. 00:03:47 You will get more insight as to this in the last unit,

where we do a demo implementing a sideby-side extension 00:03:52 using the ABAP RESTful

Programming Model approach. As you look on the current screen, 00:03:57 you will notice that while

both CDS and business objects do remain part of the ABAP RESTful Programming Model, 00:04:04 the

process by which business objects are developed shifts from a BOPF approach to a new type of artifact

00:04:11 known as a behavior definition and implementation. Similarly, creation of OData logic 00:04:19

shifts away from transaction code SEGW to the creation of a business service. 00:04:25 As mentioned a

few moments ago, the creation of these new types of artifacts is simple and easy 00:04:30 using the

Eclipse ABAP Developer Tools plugin. As we see on this screen, ABAP RESTful Programming Model

00:04:41 has an important mission. We at SAP want everyone to use it, 00:04:45 from internal SAP
developers to external developers and customers and partners. 00:04:50 We want it to be cloud-

optimized, and we follow a cloud-first strategy 00:04:54 with ABAP RESTful Programming Model. As

mentioned, we want the developer process 00:04:59 for using it to be simple and intuitive, with minimal

ramp-up time. 00:05:03 And, of course, we want it to be flexible, especially being able to reference

legacy codes, 00:05:09 code that customers want to continue using. As mentioned previously, ABAP

RESTful Programming Model 00:05:20 is based exclusively on Eclipse with the ABAP Developer Tools

plugin, 00:05:24 and is based upon two techniques, namely CDS along with the ABAP language. 00:05:30

It should be noted that the ABAP language used with ABAP RESTful Programming Model is ABAP strict.

00:05:36 You may remember from unit two that ABAP strict uses a subset of the ABAP language,

00:05:40 and access to ABAP repository objects is governed by a list of released APIs. 00:05:46

Nevertheless, even with ABAP strict, the development process is simple and smooth. 00:05:53 One very

nice feature of ABAP RESTful Programming Model is that the technical details of the implementation

00:05:58 are handled by runtime frameworks. As developers, we need not be concerned 00:06:03 with

their implementation, and can concentrate on creating our business logic instead. 00:06:11 Finally, on

this screen, let's take a look at the specific artifacts we need to create, and why. 00:06:17 Keep in mind

that in our demo in unit six, we will see how these artifacts are created. 00:06:22 For now, we will get a

good working definition. As always, and as we've said before, 00:06:28 it's about the creation of value.

And the value here is at the top layer, 00:06:32 entitled Service Consumption, at least from the end

user's perspective. 00:06:37 Imagine a wonderful app that we love to use. We can run it from our phone

or on a tablet 00:06:43 or using any browser that we like on any device, anytime, anywhere. 00:06:47

That, in a nutshell, is the value of Fiori, our main UI strategy here at SAP. 11 00:06:52 Behind that UI is

where the magic happens. This is the Business Services Provisioning layer, 00:06:58 and it consists of

several parts. First, we have a service binding and a service definition. 00:07:05 The service binding is

how that wonderful Fiori app is getting its data. 00:07:09 In this case, the data is being supplied to the

Fiori app using HTTP, and what is supplying the data is an OData service. 00:07:18 So, the service binding

is where HTTP and OData are specified. 00:07:23 Now, in the real world, you may have hundreds of

different OData services. 00:07:28 One service may retrieve customer information, and another
different service may create new sales orders. 00:07:34 Each and every one of those unique OData

services will have its own service definition, 00:07:38 which we see on the screen. Second in the

Business Services Provisioning layer, 00:07:43 we see business objects projection. Projection simply

means to present. 00:07:49 So, imagine that you have this wonderful Fiori app. You can not only display

a list of customers, 00:07:54 but edit or create new customers on the fly. So, those options must be

presented to you to use. 00:08:01 Most likely there will be buttons or links in the app that you can

choose. 00:08:05 But imagine clicking on a button and nothing happening. So, the business objects

projection 00:08:11 that we see with CDS artifacts and behavior artifacts, represent the presentation of

the various create, 00:08:18 edit, query, update, and so on, type of logic that end users expect that the

applications that they use support. 00:08:27 The actual implementation logic for those creates, edits,

queries, updates, and so on, 00:08:33 is contained in the actual business objects and queries, those

artifacts we see at the bottom, 00:08:39 under Data Modeling and Behavior. In a nutshell, that's where

you'll write the code. 00:08:45 As we've said in each previous unit, and here also, the whole is greater

than the sum of its parts. 00:08:52 Taken together, this is everything that you will develop and what it

will mean for the end user. 00:08:58 Okay. So, that concludes unit three, 00:09:01 ABAP RESTful

Programming Model. In unit four, we will take a look at the Extension Suite. 00:09:07 See you there. 12

Unit 4 00:00:05 Hi, and welcome to our openSAP course, Introduction to ABAP in the Cloud. 00:00:11

My name is Quincy Anderson, and I am an instructor in the SAP Product Learning Organization. 00:00:17

This is unit four, SAP Extension Suite and Development Efficiency. 00:00:23 Before we begin, a quick

recap of unit three, ABAP RESTful Programming Model. 00:00:29 In unit three, we saw that ABAP

RESTful Programming Model is the evolution from two predecessor models, 00:00:36 namely classic

ABAP development, and also ABAP Programming Model for SAP Fiori. 00:00:44 We also learned that

artifact development using ABAP RESTful Programming Model 00:00:48 is based exclusively on Eclipse

with the ABAP Development Tools plugin, 00:00:54 and uses ABAP strict as its ABAP language version.

Finally, we saw some of the artifacts 00:01:00 that ABAP RESTful Model uses, such as service bindings,

behavior definitions, 00:01:06 and core data services. With that, let's get started. 00:01:14 If you recall

from unit 1, Basic Concepts of SAP Business Technology Platform, 00:01:20 we learned that Business
Technology Platform offers an integrated portfolio of tools, services, 00:01:26 and environments

designed around four areas of capability. One, database and data management. 00:01:32 Two,

application development and integration. Three, analytics. 00:01:39 And four, intelligent technologies.

As part of application development and integration offering, 00:01:46 we have SAP Extension Suite in

regards to application development, 00:01:50 and SAP Integration Suite in regards to application

integration respectively, 00:01:55 as shown on the screen. SAP Extension Suite bundles together specific

tools, 00:02:01 services, and technologies for both new application development 00:02:06 and also for

the development of side-by-side extensions, as we discussed in unit two. 00:02:12 Likewise, SAP

Integration Suite bundles together specific tools, services, and technologies 00:02:19 to seamlessly

integrate on-premise and cloud-based applications and processes 00:02:24 using both customer-created

and also SAP-created content. You may sometimes hear the SAP Integration Suite 00:02:31 referred to

as SAP's Integration Platform as a Service, iPaaS, offering. 00:02:40 Both SAP Extension Suite and SAP

Integration Suite are built on our multi-cloud foundation. 00:02:46 What exactly do we mean by multi-

cloud foundation? You may recall from unit one 00:02:51 that we talked about the IaaS layer, which is

the compute, memory, storage, 00:02:57 and network layer of Business Technology Platform. And we

mentioned that to enable customer choice, 00:03:03 that layer is managed our IaaS partners, namely

Amazon, Google, and Microsoft. 00:03:10 We at SAP take responsibility for the offering and

management of BTP. 00:03:15 That arrangement we refer to as multi-cloud foundation. So both SAP

Extension Suite and SAP Integration Suite 00:03:22 were run on our partners' IaaS foundation. On our

screen here, 00:03:32 we see the three categories of SAP Extension Suite. SAP Extension Suite contains

approximately 80 services, 00:03:39 categorized into three areas that you see here, namely digital

experience, 00:03:45 digital process automation, and development efficiency. By categorizing the

different services this way, 13 00:03:53 it makes it easier for us as developers to build new applications

and extensions 00:03:58 in a smooth, intuitive manner, utilizing the correct services from each area

00:04:03 for each step of the way. Generally speaking, development efficiency services 00:04:09 have to

do with the development of applications and extensions. 00:04:13 Digital experience services have to do

with the end-user visualization of applications and extensions. 00:04:19 And finally, digital process
automation services have to do with the automation 00:04:24 and enhancement of a business process

execution. Now, let's take a closer look at how the various services 00:04:36 from SAP Extension Suite

and SAP Integration Suite can provide value. 00:04:41 Imagine a requirement to design a new

application, maybe for example to show real-time shipping information 00:04:47 of products in transit

to wholesalers. The general process to develop an application like this 00:04:53 would consist of four

steps. One, connect the necessary systems 00:04:58 through released APIs for access to necessary data.

This requirement is met by using several possible services 00:05:06 as part of the Integration Suite. You

could use the SAP API Business Hub service, 00:05:10 which we'll see in more detail on the next screen,

to discover an SAP standard API to retrieve that data, 00:05:16 say from SAP S/4HANA, for example, and

then the connectivity and destination services 00:05:22 to establish the connection and actually retrieve

the data. After step one, we go to step two, 00:05:29 which is building any necessary additional API

endpoints. This is where several development efficiency services 00:05:36 that we see on the right-hand

side of our screen come into play. 00:05:40 Particularly ABAP RESTful Programming Model and BTP,

ABAP environment, which we saw in the previous unit, 00:05:46 can be utilized to build both data

enabled service bindings and service definitions based off of CDS queries 00:05:51 and behavior

implementations. Next, we go to step three, which is channel development. 00:05:59 Let's say you want

to give your end users the choice of a mobile app that they can install on their phone 00:06:03 and also

a Web app that can be executed using a standalone browser. 00:06:07 That's where another

development efficiency service comes into play, the Business Application Studio. 00:06:13 For the Web

app, for example, you can use Business Application Studio 00:06:16 to create a Fiori Elements

application utilizing UI5. Finally, step four is the actual end user access. 00:06:25 If you look at the left

part of the screen, you see several digital experience services 00:06:29 that can be utilized. For the

mobile app, for example, you have the mobile service. 00:06:34 The Web app can be made available for

the end user to execute using SAP Fiori launchpad, 00:06:40 and also SAP Work Zone. Finally, we see in

the middle, Digital Process Automation. 00:06:48 As mentioned earlier, Digital Process Automation

consists of several services 00:06:53 that allow customers to automate the execution of business

processes. 00:06:57 Let's imagine, for example, that in our application, we offer the end user an option
to start an escalation process 00:07:03 consisting of steps to be executed if they determine that a

shipment will be delivered late, 00:07:07 so that appropriate action can be taken. These steps are

encapsulated in a workflow, 00:07:14 and they are executed by the SAP Workflow Management service,

14 00:07:17 as you see in the middle of the screen. As mentioned a few moments ago, for step one,

connectivity, 00:07:28 we have officially released APIs in the SAP Business Hub, made available by going

to https://api.sap.com. 00:07:40 Here you can discover all officially released and managed SAP APIs to

read as well as maintain data 00:07:47 across the entire portfolio of SAP products, such as SAP S/4HANA

Cloud, SuccessFactors, or SAP Ariba. 00:07:55 You can discover released APIs by exploring based on the

product, or the business process in question, 00:08:03 or simply by listing all available APIs as seen on

this screen. 00:08:10 Finally, on this screen, we see an example of some discovered APIs. 00:08:15 The

product in this case is SAP S/4HANA, and we see several API packages 00:08:21 where each package can

contain a number of released APIs. The released APIs per package can be one of several types, 00:08:28

SOAP, ODATA, or even REST. The package name and description allows us as developers 00:08:35 to

determine quickly and efficiently if the APIs meet our requirements. 00:08:39 For example, the first

package contains APIs having to do with material sourcing. 00:08:44 The second has APIs having to do

with business partner names and addresses 00:08:48 in regards to watch lists. And the final package

contains APIs 00:08:53 having to do with calculation of taxes. Okay, so that concludes unit four, 00:08:59

SAP Extension Suite and Development Efficiency. In unit five, we will take a look at extensibility options

00:09:05 for SAP S/4HANA. See you there. 15 Unit 5 00:00:05 Hi and welcome to our openSAP course,

Introduction to ABAP in the Cloud. 00:00:10 My name is Quincy Anderson and I'm an instructor in the

SAP Product Learning Organization. 00:00:15 This is unit five, Extensibility in SAP S/4HANA. Before we

begin, a quick recap of unit four, 00:00:22 SAP Extension Suite and Development Efficiency. In unit four,

we learned that both SAP Extension Suite 00:00:29 and also SAP Integration Suite bundle together

certain services 00:00:33 to facilitate application development and application integration respectively.

00:00:38 In regards to SAP Extension Suite, services are classified under digital experience, 00:00:44

digital process automation, and development efficiency. In regards to SAP Integration Suite, 00:00:51 we

have the API Business Hub, which shows us all officially released SAP APIs, 00:00:57 which we can use in
our integration efforts. With that, let's get started. 00:01:06 You may recall in unit two, Introduction to

SAP BTP, ABAP environment, 00:01:11 we mentioned that one of the use cases for BTP, ABAP

environment was extensions. 00:01:16 And we mentioned that an extension was simply new or

additional functionality. 00:01:22 Customers need to implement extensions for several reasons. One is

higher productivity. 00:01:28 Another is competitive advantage. The flexibility offered by extensions

00:01:33 is undoubtedly a benefit, so extensions are a necessary and indeed 00:01:37 featured

component of software design. However, rarely are there benefits without pitfalls, 00:01:43 and

extensions are no exception. The need for extensions must also be balanced 00:01:47 against the cost.

Software is always patched and upgraded 00:01:51 based on a fixed schedule, and new innovations are

introduced constantly. 00:01:56 This can cause problems with extensions. Previously implemented

extensions must be tested 00:02:03 and validated, and possibly adapted to new releases of the

software. 00:02:09 This could result in a delay in adoption of innovations, which can be a disadvantage

to an enterprise. 00:02:16 Also, the more extensions that must be managed by an organization, 00:02:20

the more the costs of managing those extensions rise. The good news, however, is that these risks

00:02:26 can be mitigated with the right approach. This approach is centered around an extensibility

framework, 00:02:33 which reduces the overall cost of extension maintenance, and also allows a

customer 00:02:38 to adopt innovations quickly and easily with minimal disruption. 00:02:44 Upgrade

projects as a result don't require massive investments of time and money. 00:02:49 In that spirit, the

extension framework for SAP S/4HANA is centered around 00:02:54 two types of extensions - in-app

extensions, which we see here, 00:02:59 and side-by-side extensions, which we will see in a moment.

00:03:03 In-app extensions are implemented inside the core of SAP S/4HANA, 00:03:07 and as a result,

no remote communication between the extension 00:03:12 and the SAP HANA system is required. Let's

look at some of the extensions that are possible. 00:03:19 In bullet point one, we see UI adaptation,

which could be, for example, 00:03:24 hiding a field in a table or renaming a label. For bullet point two,

we have custom fields, 00:03:31 which are new custom fields created to extend SAP database tables,

CDS views, or OData APIs. 16 00:03:40 Bullet point three, custom CDS views, analytics and forms, allows

customers to create new views 00:03:47 based on an existing view model with all supporting features,
such as associations, 00:03:53 joins, and selections. In bullet point four, business logic enhancement

spots, 00:04:01 also known as BAdIs, can be implemented. Bullet point five, custom business objects,

00:04:09 allows customers to create new business objects, which automatically create the required

database tables. 00:04:15 Finally, in bullet point six, custom user interfaces, customers can create their

own SAP Fiori user interfaces, 00:04:24 either from scratch or based on templates. The UI consumes SAP

S/4HANA's RESTful OData interfaces. 00:04:39 On this screen, we see how a key user would access some

of the tools 00:04:44 that are needed to do in-app extensions. One of the features of in-app extensions

00:04:50 is the easy-to-use tools that are used to implement those extensions. 00:04:54 They're

specifically designed so that non-developers can you use them. 00:05:03 Finally, on this screen, we see

side-by-side extensions. 00:05:07 One of the key distinguishing characteristics of side-by-side extensions

00:05:11 is that they are implemented outside the scope of SAP S/4HANA, 00:05:16 and as a result,

remote communication between the extension and SAP S/4HANA is required. 00:05:23 BTP takes care of

this via two services. First, the connectivity service, 00:05:30 which establishes secure tunnels for the

safe transfer of data back and forth 00:05:35 between a subaccount and an on-premise environment.

And second, the destination service, 00:05:41 which allows destinations to specific on-premise systems

being used by applications to be created and maintained. 00:05:49 Let's take a quick look at the

components that make up side-by-side extensions. 00:05:54 First, in bullet point one, we have custom

UIs. These UIs will be built with SAP Business Application Studio 00:06:02 and can be deployed to and

run on BTP. They can use not only OData services built on BTP, 00:06:11 but also OData services that are

standard as part of SAP S/4HANA 00:06:15 and extended via in-app extensions. Bullet point two is a full-

stack application 00:06:22 developed using either the Cloud Application Programming Model or the

ABAP RESTful programming model, 00:06:27 which we see on the far left. Being able to use either

programming model 00:06:32 allows extensions to run on any of the supported runtime environments,

00:06:35 that is, Cloud Foundry, Kyma, or BTP, ABAP environment. 00:06:41 Bullet point three shows

the same thing with the exception that the OData service 00:06:46 is based off of an extension created

using in-app extensibility on the SAP S/4HANA system. 00:06:53 Bullet point four shows how SAP

S/4HANA can fire off business events 00:06:58 that can start apps running on BTP. Finally, bullet point
five shows how data replication 00:07:05 is possible, which can support a wide variety of analytics

scenarios for customers. 00:07:11 So that concludes unit five, Extensibility in SAP S/4HANA. 00:07:16 In

unit six, we will do a comprehensive demo utilizing the knowledge that we have gained 00:07:21 in units

one through five. See you there. 17 Unit 6 00:00:11 Hi, and welcome to our openSAP course,

Introduction to ABAP in the Cloud. My name is Quincy Anderson and I'm an instructor 00:00:20 in the

SAP Product Learning Organization. This is unit six, how to do side-by-side extensions. 00:00:26 Before

we begin, a quick recap of unit five, extensibility in SAP S/4HANA. 00:00:32 In unit five, we learned that

there are two types of extensions, 00:00:36 in-app extensions, which are implemented inside the core of

SAP S/4HANA, 00:00:41 and side-by-side extensions, which are implemented in Business Technology

Platform. 00:00:48 With that, let's get started. In unit six, we will do a demo 00:00:54 on how to

implement side-by-side extensions. We will use Eclipse with the ABAP Development Tools set 00:01:00

to do so. With that, let's get started with our demo. 00:01:05 So here we see Eclipse with the ABAP

Development Tools set installed. So what we will do is we will load up 00:01:12 the ABAP Development

Tools set, and then we will connect our ABAP instance in the cloud. 00:01:19 So we click on Window,

Perspective, Open Perspective, Other, and the ABAP perspective will be at the top. 00:01:29 A

perspective is merely an arrangement of windows, and so we'll see the windows appear. 00:01:35

Because we need a little bit of room on the right-hand side, we're going to take the Feature Explorer,

00:01:40 and we're going to close it out. Give us a little bit more room to see what we're doing. 00:01:45

And then in our Web browser, we're going to get our information about 00:01:49 our ABAP instance

ready. So, as you can see here, 00:01:52 this is the SAP Business Technology Platform cockpit login

screen. And so we will click on Sign In at the top right-hand corner, 00:02:01 and then we will log in with

our ID and password. Once logged in, we go to our global account cockpit view. 00:02:25 The

subaccount view is located on this first tile. There are approximately 85 or so subaccounts, 00:02:35 but

there is a filter that we can use so that we can pull up the one that we want 00:02:40 quickly and easily.

So I'll click on Subaccounts over here 00:02:43 on the left-hand side, as you just saw me do. And rather

than scroll through a list of 80 or so, 00:02:49 I'll just put in a nice string to represent the one that I

want. 00:02:54 And there it is right there, CLD400-A. Click on that subaccount. 00:02:59 And then we go
into the subaccount cockpit. To confirm that there is an ABAP instance available 00:03:06 we click on

Instances and Subscriptions on the left-hand side. 00:03:17 And once this loads up, we will then notice if

we go to Instances, that there are a total of four, 00:03:24 and the very first one is the one that we're

interested in, "abap", the service being "ABAP environment", 00:03:30 and then of course, the space

that it's located in, which is "training". 00:03:34 Now that we've confirmed that, now we can go ahead

and connect. 00:03:38 So in the top left-hand corner, we will click where it says, "Create an ABAP cloud

project". 00:03:43 And then a wizard will pop up, which will lead us through a series of steps. 00:03:46

The first step is how do you want to connect? Do you want to use a service key, 00:03:49 or do you want

to log in directly? We'll choose the latter, which is the first option. 18 00:03:55 We will then choose our

region. In this case, the subaccount is located 00:03:59 in the Europe region, the URL fills in

automatically, 00:04:04 and then we will again put in our user ID password. When we hit Next, we'll

then choose our organization, 00:04:24 which in this case is the first option, the space, which in this case

is training. 00:04:31 And then the service instance, which in this case is ABAP. We'll choose Next.

00:04:39 And then one final logon we need to do. So if you notice on the left-hand side, 00:04:44 it says,

"Open the login page in the default browser of the operating system". 00:04:48 Or, if we go with the

right-hand side, we can open up a browser ourselves 00:04:51 and then copy the logon URL to the

clipboard - either will work, merely a matter of just the technique 00:04:56 you prefer to use. We'll go

ahead and use the one on the left. 00:05:02 This will open up a browser, and then we'll log in. We'll

acknowledge several times. 00:05:31 And notice we get a message that says, "You have been

successfully logged on", 00:05:35 and at your discretion, you can close the page or not. If we come back

to Eclipse, you'll notice it is refreshed. 00:05:41 And we now see that Eclipse has connected us to this

instance. 00:05:46 We'll click Next. And then the final thing is, 00:05:48 are there any favorite packages

that you'd like to add? In this case, yes. 00:05:52 The ZLOCAL package that is here is what we do want to

add. And we can finally click on Finish. 00:05:58 The left-hand side will refresh. And we can confirm now

that we are actually connected 00:06:03 to our ABAP instance in the cloud. That is a generated package,

00:06:08 which we will use to do our development work. If we expand it, you'll notice that 00:06:12

there are a variety and a large number of packages that are currently assigned to it. 00:06:17 But that is
of no concern us, we are going to create our own. 00:06:21 So I will come here to ZLOCAL. I will do a

right click. 00:06:26 Hit New, and then you'll notice ABAP Package. Name will be Z_ABAP_OPENSAP.

00:06:38 And then the description will be demonstration. When I click on Next, 00:06:47 it will ask for a

transport request. We'll create a new request. 00:07:04 And then click Finish. You will see the package

appear up at the top 00:07:11 on the left-hand side. We can now start creating the artifacts 00:07:16

that we need to create. If we recall in unit four, 00:07:19 which was the unit about the ABAP RESTful

Programming Model, there were a series of different types of artifacts 00:07:26 that can be created -

from tables to core data services, to service definitions, to service bindings. 00:07:33 And so our demo

will basically cover creating those artifacts. 00:07:38 So we'll start by creating two database tables that

we're going to need. 00:07:42 One database table will be a list of courses that can be taken. 00:07:46

And then the other database table will be a schedule of when those courses are offered. 00:07:51 So we

right-click on the package. We click on New, we go to Other ABAP Repository Object. 00:07:57 You will

see Dictionary, we will open Dictionary and then choose Database Table. 00:08:04 Click on Next, and

then give the table a name. We will copy the name from our prepared code. 00:08:12 So in this case

zcourse_osap1. And then the description will be the course schedule. 00:08:30 Click Next. And then a

series of transport requests will appear. 19 00:08:35 We'll choose the first one, 335, click Finish, and it

will then open up. 00:08:41 As I mentioned earlier, the code has been pre-prepared. Before we paste in

the code, we'll first change the font size 00:08:48 so that we can see the code a little clearer. So we'll

click on Window preferences, type in "font", 00:08:57 and then for colors and fonts, we will change the

basic text font 00:09:06 to font type, Lucida Console, bold, size 16, and then apply and close. 00:09:17

We will now take our table in question, or at least our prepared code, I should say, 00:09:23 copy that

code, come back into our editor and paste. 00:09:30 The Save button is in the top left-hand corner, and

don't be concerned about the errors just yet. 00:09:38 But as you can see here, we now have a defined

table, zcourse_osap1, with some various fields, 00:09:46 client, course, course ID, course name, course

length, and so on. 00:09:53 We will now create an additional table. So right-click. 00:10:00 And New,

Other ABAP Repository Object. Again, another table. 00:10:11 And then this one will be based off of a

schedule. Choose our transport again as before, 00:10:42 and then use our prepared code, and then
save. 00:10:54 Okay, so there's the course table that's on the left and the schedule table on the right.

00:11:01 There's one slight change I need to make right here, that should be referencing the current

table. 00:11:09 And so now we'll begin the process of activating the tables. So if we expand the package

and expand Dictionary, 00:11:15 expand Database Tables on the left, you'll see the two tables. 00:11:19

We'll use our shift key to select them both, right-click, and then you'll see the Activate button. 00:11:26

There's also an Activate button up here in the toolbar that can be used alternatively. 00:11:33 Either

way, it will bring up this list. So I will choose both tables as part of 00:11:40 this transport request, and

then choose Activate. Activation generally doesn't take very long. 00:11:49 And as you can see, the

tables are now activated. If I were to right-click on either table, 00:11:55 so I'll do this for the course

table first, I can open with the data preview 00:12:01 just to show that there are no records in the table

just yet. 00:12:04 Likewise, I can do that with schedule. So let's get some data in these tables. 00:12:15

To do that, we'll go back to our package. And then this time we will create a new 00:12:20 and a quick

ABAP program as an ABAP class. The name will be this name right here. 00:12:41 And our description

will be Fill Tables with Data. We click Next, choose our transport request. 00:12:54 Choose Finish. And

again, take our prepared code. 00:13:11 The purpose of this code again is merely just to take the two

tables that we just created 00:13:14 a few moments ago, and just put in just a few little records, record

number one, record number two, record number three 00:13:21 in the course table. And again, record

number one, record number two 00:13:27 in the schedule table. So now that the code has been put in,

we'll do a quick save. 00:13:35 And again, we'll use our Activate button, which is right here, and that will

activate this ABAP class. 00:13:44 You will see it over on the left-hand side, under Source Code Library,

Classes, and the class. 00:13:51 We will now execute it to fill the tables with data. right-click, Run As, and

ABAP Application in the console. 00:14:04 Notice it gives us some output to the console. It basically says

that we put three entries 20 00:14:09 in the course table and then two entries in the schedule table.

00:14:13 If we go to the course table, which when we ran earlier, did not have any records, 00:14:19 we

can use the Refresh button, which is right here in the top right-hand corner. 00:14:22 And we now

notice that there are indeed three records. Likewise, with the schedule table refreshing, 00:14:29 and

we can see that there are now two. So that takes care of that part. 00:14:33 And just in terms of
creating the tables and putting some data in them. 00:14:37 So now we'll move to the next level of the

RESTful ABAP Programming Model. 00:14:42 And we will create some core data services artifacts to

work with these two data tables. 00:14:49 So for that, we go back to our package, we right-click, we click

on New, Other ABAP Repository Object. 00:14:57 And now we shift to Core Data Services. When we

expand, you'll see a couple of different artifacts 00:15:03 that are here. So we will be using two - Data

Definition first, 00:15:08 and then a little bit later Metadata Extension. But first Data Definition, 00:15:14

this particular artifact is where we structure the semantics of the core data services artifact. 00:15:21

We'll click on Next. And then the first one that we will create 00:15:27 will be called ZI_COURSE_OSAP1.

So we will put that value in. 00:15:37 And then for description, this will be Course Information, 00:15:47

and then we'll click on Next, choose our transport request, click on Next. 00:15:53 We will not choose

any particular value on this particular screen. 00:15:57 We'll just go with the default, which is Define

View, and then click on Finish. 00:16:01 The reason why is because our code is prepared. And so we will

put all the code that we need here 00:16:07 in this particular view. We do get a little pop-up box that

prompts us, 00:16:11 do we want to update ABAP Development Tools? However, the release that we

have is sufficient 00:16:16 for our demonstration, and so there's no need to do that. So we will click on

Cancel. 00:16:22 So now we can copy our code over, and then we'll do a save here in the top left-hand

corner. 00:16:41 So basically what this particular code does is it basically says that we want to create

00:16:46 a core data services artifact. And the name of it is going to be ZI_COURSE_OSAP1. 00:16:53

And we will be selecting from the database table that we activated a few moments ago, 00:16:58 which

we'd like to call Course. And then in addition to that, 00:17:02 we're going to bring some other data into

play, which is going to be data from the other table 00:17:07 that we activated, ZI_SCHEDULE_OSAP1.

And then in addition, two other CDS artifacts that preexist 00:17:19 are I_Currency and I_Country. If I

wanted to take a look for example, 00:17:25 at I_Currency, I could right-click on it. And then I can say

Navigate To. 00:17:30 It'll open up a new tab, or I can examine this particular view to see, oh, 00:17:35

what table is it selecting from? In this case, it's doing a join, and potentially 00:17:40 the fields that are

in it. So effectively, we are modeling out our data structure 00:17:46 that we want to use in our

application. So now there's a second view that we need. 00:17:53 You'll notice there's a little error here
because this one doesn't exist. 00:17:56 So there's a dependency there, so we need to create that. So

we can do a quick copy 00:18:02 and then we can now create the second core data services view.

00:18:06 I can right-click at the package level, or, since I already have a core data services view, 00:18:11

I can right-click at that level and get a little bit of a shorter menu. 21 00:18:16 So I'll choose that option,

click on Data Definition, and paste. 00:18:28 We'll click Next, transport request. Again, we won't

necessarily worry about 00:18:34 choosing anything here since our code is pre-prepared, so hit Finish

and then grab our code. 00:18:56 And then we'll do another save. So now both CDSs have been created.

00:19:05 The second core data service here, as you can see, is based off of this name,

ZI_SCHEDULE_OSAP1, 00:19:12 selecting from this second table that we activated, calling it Schedule.

00:19:16 And there's a dependency in the form of association to the first CDS artifact that we created a

few moments ago. 00:19:24 So a mutual, almost a circular type of dependency. And then of course the

fields that will be output 00:19:29 we will see here. So because of the mutual dependency, 00:19:32

they must be activated together. So we'll click on the first one over on the left, 00:19:36 use our shift

key, click on the second, and then the activate all you'll see right here. 00:19:44 Make sure that both are

chosen, and Activate. And there we go, both are activated and ready to go. 00:20:04 If I were to take

either CDS view, and I'll actually do this with both, 00:20:08 I'll right-click on the first one, course, and

Open With, Data Preview. 00:20:14 We know the database tables have data, so now let's confirm that

the CDS is picking up that data. 00:20:21 And lo and behold, it is. Likewise with schedule, right-click,

00:20:27 and Open With, Data Preview, and we see our two records. 00:20:33 Okay, so now these two

particular CDS views are what are known as interface views 00:20:39 from a conceptual perspective. So

they're just structuring data that we want to display. 00:20:45 So we want certain fields here, and this is

the course one. And then of course the schedule one, the same thing. 00:20:52 Again, we want certain

fields. Now, different applications and reports 00:20:58 that you could do could use different fields.

Maybe one needs all the fields, 00:21:04 maybe a different one only needs a few fields, as you can see

me highlighting here. 00:21:09 So we have another type of CDS view known as a consumption view that

takes that into consideration. 00:21:15 So we're going to create two additional CDS views that represent

that. 00:21:22 So the first one we will call the ZC_COURSE_OSAP1. And let's create that now. 00:21:33
So again, Data Definitions, New, and Data Definition. Again, Course Information, 00:21:46 which we can

now select from our shortcut menu. Hit Next, confirm our transport number. 00:21:55 Again, no need to

choose an option here since we're going to put in prepared code, 00:22:03 and let's look at our prepared

code and copy that in. There's our save. 00:22:19 And there we go. And so one of the things that you

notice here 00:22:22 is that the dependency is obvious. If you look on line seven, 00:22:26 we're

creating a new CDS view. However, it is a projection, which just means that simply 00:22:33 some fields

from this CDS view here that we activated a few moments ago. 00:22:39 Again, this dependency now

you'll be able to notice by looking at that. 00:22:44 So from that, we want these particular fields. Now

you'll notice there's an arrow down here at the bottom 00:22:52 because that doesn't exist yet. So just

like before, we're going to save this, 00:22:56 or actually we've already saved it. Let's create the second

one. 22 00:22:59 And then we'll have to activate them together because of the mutual dependency that

they share. 00:23:05 So do a quick copy, come to Data Definitions, New, and our final data definition.

00:23:17 Schedule Information, hit Next, confirm our transport, Finish, 00:23:29 and then copy our

prepared code over. Do a quick save. 00:23:51 And again, because of the mutual dependencies, these

will have to be activated together. 00:23:56 So we choose the course, we choose the schedule, 00:24:01

we right-click, or choose Activate here, or, as I mentioned earlier, 00:24:07 there's also Activate up in

the top in the menu bar. Make sure that both of them are going to be activated 00:24:16 because of the

mutual dependency and then activation. In the bottom right-hand corner 00:24:24 you'll see the

progress of the activation. When that finishes, then you know they're activated. 00:24:32 Also, when

inactivated, there's a special icon that appears on the element, but once activated, that icon disappears.

00:24:43 Okay. So now our next level in our RESTful Application Programming Model 00:24:49 is what's

known as a metadata extension. A metadata extension is just simply 00:24:55 some additional

annotations that I could put in the CDS itself, but instead I will put them 00:25:02 in a separate artifact,

which can make the code a little easier in terms of the annotations to read. 00:25:08 Again, the

annotations can go up at the top, or the annotations could be attached to a field, 00:25:13 if they're

field-level annotations. They can always go in the CDS, 00:25:17 but they can also go in a separate

artifact, again, to make them a little bit easier to read. 00:25:23 So we'll demonstrate that. So we'll come
to Core Data Services 00:25:27 and this time we'll do a New, Metadata Extension. And there we go.

00:25:36 So our first one will have the same name as the CDS view in which the metadata extension will

apply to. 00:26:01 Use our transport request. And again, we'll be annotating a view, 00:26:07 and the

annotations we will now copy in. So these annotations will be evaluated 00:26:14 by our Fiori elements

UI application that we're going to be demonstrating shortly. 00:26:23 The annotations are UI in their

nature. So as you can see here, for example, header information, 00:26:32 so typeName singular is

Course, typeNamePlural is Courses, title is CourseId, and so on. 00:26:42 You'll also notice here there's a

field that the CDS actually has in the output, 00:26:48 but the annotation says to go ahead and hide that

field so the end user would not actually see it on the output. 00:26:54 So things like that can go in a

metadata extension. We'll need a second one. 00:27:02 So New, Metadata Extension, copy our name,

put in the name, schedule info. 00:27:31 And then Finish. Copy over our information. 00:27:46 Similar to

the first metadata extension, for the first course consumption CDS view, 00:27:53 this one again will

contain annotations that will be evaluated by the Fiori runtime, 00:27:58 and that will affect how the UI

is rendered for the user. So for example, the scheduleUuid field will be hidden. 00:28:06 CourseBegin

will be the first field on the output, as you see lineitem here. 00:28:12 Location will be the third field... I

take that back. 00:28:16 Trainer will be the third field, position 30, location will be the second field.

00:28:21 The annotations can go before or after the field. So you look for the semi-colon - in this case,

23 00:28:27 since the semi-colon is located on line 30, then we know the annotations on line 28 and 29

apply to it. 00:28:34 Similarly, we see the semi-colon on line 35, and therefore the annotations on line

32 and 33 apply to it. 00:28:43 So the metadata extensions are here. You'll notice the icon - 00:28:48 it's

hard to see, it's very small, but it's a little yellow icon that tells us that 00:28:52 the artifacts are not

activated yet. So we'll choose them both. 00:28:56 And then again, we have our Activate button right

here. Whoops. It looks like one has not been saved yet. 00:29:04 Let's do a cancel, although I could have

saved at that point. 00:29:07 But the Save button is here and there's a Save All button right next to it.

00:29:11 Let's do Save All just to be safe. And then we will repeat our process, select, 00:29:17 and then

activate all, confirm that both are there, and then Activate. 00:29:30 Okay. So the final artifact that we

now need to create 00:29:34 is something called a service definition. What a service definition will do is
expose these artifacts 00:29:40 as an OData endpoint so they can be used in a Fiori application. 00:29:47

So we'll copy our name to get it ready, and then we'll create our service definition. 00:29:57 So New,

service definition appears in the New ABAP Repository Object pop-up under Business Services, 00:30:07

Service Definition. We click Next, put a name, and then Service Definition. 00:30:21 Click Next. Confirm

our transport. 00:30:27 Again, we have prepared code. So click Finish, 00:30:35 and then get that

information ready. You'll notice looking at the code, 00:30:47 so we're going to define a service

definition, and then we're going to expose, as an OData entity set, 00:30:55 we're going to expose

course information, which is based off of this CDS view, 00:31:01 schedule information, which is based

off of this CDS view, country information, based off of this CDS view, 00:31:09 and finally currency

information, based off of that CDS view. So finally, after the service definition, 00:31:23 we will create a

service binding. The service binding will be based off of the service definition. 00:31:29 We can save

ourselves a little work by right-clicking directly on the service definition 00:31:36 and then choosing a

new service binding. This way it'll automatically know that that service binding 00:31:40 is based off of

this service definition. For the binding type, notice we have several options. 00:31:47 What we will

choose is OData V2 - UI. There's the service definition that it's based off of, 00:31:55 and then finally the

name. So we will call this Z and then service binding, 00:32:05 SB_COURSE_OSAP1. And again, this is the

service binding. 00:32:16 Hit Next. Let's see, an active version does not exist. 00:32:21 Ah yes, forgot to

activate, no problem. We'll just click Cancel real quick. 00:32:27 You'll see the little icon telling us that

we've not activated. 00:32:29 And then of course we'll click the Activate button right there. 00:32:34

Wait until it activates. And then as they say, "Wash, rinse, repeat." 00:32:40 So right-click, New Service

Binding, and let's do it again. Our names are now in-memory, so we can just choose them. 00:32:57 Re-

select the binding again, and now it should be happy. 24 00:33:04 Transport request, and there we go,

that's our service binding. 00:33:11 Okay. So again, the service definition describes 00:33:15 what is

going to be exposed as an OData endpoint. What specific entity sets, meaning what specific data,

00:33:22 the service binding, which is very closely related to it is now, how is it going to be exposed?

00:33:28 Do you want to use Web API? Do you want to use OData version 2, OData version 4. 00:33:35

Once this is done, we'll activate, or actually... 00:33:46 And then once the activation is done, there's a
slightly extra step or one extra step that is needed, 00:33:52 which is a publish. Since a URL is generated

based on the service binding, 00:33:57 that URL has to be whitelisted and the publish does that. Once

the publishing is done, we'll actually see the URL. 00:34:33 And we will be patient while it continues to

publish. Sometimes this happens very quickly. 00:34:38 Other times it can take a little bit longer, and it is

done. 00:34:47 You'll notice the service URL, which is right here. And then you'll see the entity sets that

are exposed - 00:34:55 Country, Currency, Course, and Schedule. Takes that directly from the service

definition, which is right here. 00:35:03 Again, you'll see a snippet of the URL, which is here. 00:35:07

Where it says Service URL, if you click on it, you will actually be able to see the entire URL 00:35:14 that

appears in the Web browser window, right there. Okay. 00:35:21 So our final step now is to go ahead, to

finish our end to end, 00:35:25 to actually look at a UI application that will be based off of this. 00:35:28

Luckily we have a preview. You would actually, to build your UI application, 00:35:33 at this point shift

over to the Business Application Studio using this URL, and then design a Fiori application. 00:35:40 You

can use Fiori elements or freestyle as your choice. So for our purposes, we can just use the preview.

00:35:45 That'll give us enough of an idea of what the UI will look like. 00:35:49 We click on Preview. It

opens it up. 00:35:57 And there we go. So the first thing that we'll do is we'll put some columns 00:36:03

in our output. So we'll do a select all, and then we'll click Go. And then we will actually see our data. So

country information, in terms of the key, the region name, ISO code, and so on. Okay, that concludes

our demo for unit six, how to do side-by-side extensions. It also concludes our openSAP course,

Introduction to ABAP in the Cloud. It was a pleasure to have you.

You might also like