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

First-hand knowledge.

Reading Sample
OData services help connect the SAP Fiori frontend to the SAP
S/4HANA or SAP BTP backend system. This sample chapter will pro-
vide an overview of OData, including new features in OData V4.
You’ll learn to model and generate OData services with step-by-
step instructions, primarily for SAP S/4HANA.

“Creating OData Services”

Contents

Index

The Authors

Souvik Roy, Aleksandar Debelic, Gairik Acharya

SAP Fiori: Implementation and Development


570 pages | 12/2022 | $89.95 | ISBN 978-1-4932-2204-9
www.sap-press.com/5449
Chapter 6
Creating OData Services
OData services help connect the SAP Fiori frontend to the SAP S/4HANA
or SAP BTP backend system. This chapter will provide an overview of
OData, including new features in OData V4. You’ll learn to model and
6
generate OData services with step-by-step instructions, primarily for
SAP S/4HANA.

Understanding the concept and use of OData is extremely important for developing
your own SAP Fiori applications or troubleshooting any standard SAP Fiori applica-
tions, as the SAP Fiori UI interacts with the backend services based on the OData proto-
col. Although you can use a plain REST protocol or can use a custom approach to
consume data, using OData is the recommended approach for SAPUI5–based SAP Fiori
applications. In this chapter, we’ll explain the OData protocol, its main query options,
different ways of implementing an OData service, and how to test such a service before
using it in your SAP Fiori application. So, let’s begin our OData learning journey!

6.1 Introduction to OData


We’ll split this introduction into three different parts: we’ll start with an OData over-
view, then explain the different query options available with OData, and finally we’ll
explain the different versions of OData available in SAP S/4HANA.

6.1.1 Overview
Before explaining OData, let’s go over representational state transfer (REST) first. REST
is a designed principle based on six architectural constraints:
쐍 Client-server architecture
쐍 Statelessness
쐍 Cacheability
쐍 Layered systems
쐍 Uniform interface between clients and servers
쐍 Code on demand (optional)

185
6 Creating OData Services 6.1 Introduction to OData

Any software system that follows these five or six (with five mandatory and one If you enter the URI into the address bar of your browser and press (Enter), it displays
optional) principles is referred to as RESTful. The World Wide Web is a key example of a the service document shown in Figure 6.1. As you can see, the service document refers
software system that fully implements REST principles. REST commands are of differ- to multiple collections: Customers, Orders, Products, and so on.
ent types, like GET to get one or multiple entries, POST to create an entry, PUT to update
an entry, DELETE to remove an entry, or UPDATE to update single properties of an existing
entry. HTTP(S) is the protocol that implements the server-side resource manipulation
techniques by providing methods that match the REST commands, like GET, PUT, and so
6
on.
OData is a web protocol based on REST, for querying and updating data and for provid-
ing access to information from a variety of applications. In our case, OData will provide
access to SAP S/4HANA and SAP BTP backend information via SAP Fiori applications.
OData is easy to understand and extensible and provides consumers with a predictable
interface for querying a variety of data sources. OData services can be queried like SQL
queries and thus are easy to implement in a consumer application.
Moreover, OData methods are aligned with HTTP methods like GET, PUT, and so on,
which helps developers easily understand how data is getting queried or updated.
Using OData is extremely simple and easy and a unique approach irrespective of the
service you’re using. Prior to OData, there were standardization problems with con-
suming pure REST services as the query option and payload structure were different for
each service and developers had to put some significant effort into consuming any
RESTful services. Using OData, developers can now query any services like database
SQL with a consistent approach, thus saving a lot of time.
SAP Gateway is an ABAP component that provides tools and infrastructure to create
and consume OData services. SAP Gateway is an integral part of SAP S/4HANA and thus
you do not need to install the SAP Gateway-specific components separately.
Now let’s examine the structure of an OData service and different available query
options.
Figure 6.1 OData Service Document

6.1.2 Query Options If you want to see the metadata document, you need to add “$metadata” at the end of
the root URI. So the metadata URI would be https://services.odata.org/Northwind/
Let’s go over the OData structure first, which we can do using a publicly available
Northwind.svc/$metadata, and Figure 6.2 displays the metadata of this service. The
Northwind OData service. We’ll be using this service in future chapters as well for build-
metadata shows various entity types, attributes for each entity types, entity sets, asso-
ing various SAP Fiori applications.
ciations, and more, so you can get to know more about the service by studying its meta-
Each OData service must have a root URI. For the Northwind OData service, the root data document. All the EntitySet elements are combined under EntityContainer, as
URI is https://services.odata.org/Northwind/Northwind.svc/. Each service has two types shown in Figure 6.3.
of documents associated with it: service documents and service metadata documents.

186 187
6 Creating OData Services 6.1 Introduction to OData

Figure 6.4 Data for One Entity Set in JSON Format

Figure 6.2 Service Metadata Document The $select option will help you limit the number of attributes to be returned. For
example, https://services.odata.org/Northwind/Northwind.svc/Orders?$format=json&
$select=OrderID,CustomerID will only return two attributes, OrderID and CustomerID,
as shown in Figure 6.5. This $select option is like the SQL field list option in a query.

Figure 6.3 EntityContainer Element

If you want to display the data for any entity sets, you need to enter the entity’s name
next to the root URI; for example, https://services.odata.org/Northwind/Northwind.svc/
Orders will display all the available orders. If you add “?$format=json”—that is, the URL
becomes https://services.odata.org/Northwind/Northwind.svc/Orders?$format=json—then
it will display the data in JSON format, as shown in Figure 6.4. Figure 6.5 $select Option

188 189
6 Creating OData Services 6.1 Introduction to OData

Using the $filter option, you can filter based on certain attributes values. For example, Now you can understand the simplicity of OData queries and how similar they are to
https://services.odata.org/Northwind/Northwind.svc/Orders?$format=json&$select=Order SQL queries. Frontend developers can use this concept consistently to build service
ID,CustomerID&$filter=CustomerID eq ‘HANAR’ will display only those orders related to query options. Before we move to service development options, let’s quickly go over
customer HANAR, as shown in Figure 6.6. OData versions and how V4 is different than V2.

6.1.3 OData Versions


As a part of SAP Gateway, SAP followed OData V2 to develop its OData framework and 6
APIs. SAP’s OData framework is stable and heavily used in almost all SAP Fiori applica-
tion development. However, SAP also supports OData V4 starting from SAP NetWeaver
7.5, and this has matured over time. Gaps in the OData V2 standards have been filled and
concepts have been optimized to fully satisfy the business requirements of SAP applica-
tions. The main changes aim to improve processing time and resource consumption on
clients and servers and to reflect the complexity of the underlying business model.
Some of the key benefits of using OData V4 in SAP Fiori applications are as follows:
쐍 Analytical applications based on OData V4 can fully utilize the power of SAP HANA
infrastructure.
쐍 Applications can be created on the fly, and dynamic UI rendering is also possible.
쐍 Development of more sophisticated and scaling applications is possible.
Figure 6.6 $filter Option 쐍 The ABAP RESTful application programming model supports OData V4. We’ll talk
more about this model later in this chapter.
You can use the $top option to restrict the number of records, and $count will return the
However, implementing OData V4 services in SAP Gateway will also have several con-
number of records for that entity set. You’ll soon see that $count can also be used with
straints. Some of these are as follows:
other options in OData V4, which wasn’t possible in OData V2. The $expand option will be
equivalent to a complex query or subquery. For example, https://services.odata.org/V2/ 쐍 OAuth 2.0 authentication in an on-premise system isn’t possible.
Northwind/Northwind.svc/Categories(1)/?$expand=Products will retrieve all the prod- 쐍 Only limited $filter query options are possible—for example, startswith, contains,
ucts where category equals 1, as shown by CategoryID: 1 in Figure 6.7. and endswith. Literal comparisons—EQ, GT, and the like—can’t be used with $filter.
Filtering on a complex property is also not possible.
쐍 Asynchronous OData $batch request isn’t possible with SAP Gateway, even though
it’s given in the OData specification.
쐍 Parallelization of a $batch request isn’t possible.
쐍 Arithmetic operators are not allowed with the $orderby option.
쐍 The $count expression within $orderby is not supported.
쐍 Automatic conversion of property values to uppercase isn’t supported.
쐍 There are some limitations in error handling in the data provider class. (You’ll learn
more about the data provider class in the next section.)
쐍 The $expand and $select options are only supported for actions that return a single
entity or an entity collection.
쐍 The $deltatoken option is only supported for entity sets.
쐍 The SAP Gateway service builder doesn’t support import ABAP data dictionary
(DDIC) functionality for the V4 services.
Figure 6.7 $expand Option

190 191
6 Creating OData Services 6.2 SAP Gateway Service Builder

쐍 There are several restrictions on creating deep entities.


쐍 OData entity tag (Etag) is not supported for properties typed as Edm.Stream.

We recommend reviewing all the constraints prior to OData V4 implementation, and


OSS SAP Note 2322624 can be referred to evaluate all the current constraints.
So, now you understand that even though OData V4 is an improvement and has
addressed many limitations of V2, there’re still restrictions in the SAP Gateway envi-
ronment. Next, we’ll explain the primary differences between the OData V4 and V2 6
specifications. Note that all the OData V4 specification features may not have been
implemented in SAP Gateway. This overview will help you understand the key benefits
of V4 even if all the V4 functionalities may not be available in your current SAP
S/4HANA release:
쐍 OData V4 is approved by OASIS Open and the International Organization for Stan-
Figure 6.8 Components of Service Generated in Service Builder
dardization (ISO). However, V2 carried the Microsoft Open Specification Promise.
쐍 XML payloads are not used in OData V4 and developers are strongly encouraged to
Other than consuming the OData services in SAP Fiori, you also can use these services
use JSON only. Metadata can still be retrieved using XML.
as APIs for consumption from other systems. You can achieve this either by creating a
쐍 You can now control the amount of metadata in OData V4, which wasn’t possible in new data model or copying from a very similar existing data model. Thus, SAP Gateway
V2. Depending on your use case, this can significantly improve performance. How- Service Builder provides numerous ways of reusing existing data sources from an SAP
ever, you may need full metadata for your SAP Fiori development. backend system like SAP S/4HANA, thereby accelerating the development process sig-
쐍 V4 provides a more flexible search option through the $search option. nificantly. SAP Gateway Service Builder supports the development phases for OData
쐍 Several data types have been eliminated in V4: Edm.Float, Edm.Time, and others. There services shown in Figure 6.9.
are alternatives available for these replaced data types.
쐍 $count has been enhanced for use with $filter, $expand, and $orderby. However, as OData Service
Definition in
mentioned previously, $count with $orderby can’t be used in SAP Gateway. Transaction SEGW
쐍 Entity updates are handled better in OData V4.
쐍 $expand has been significantly enhanced in V4 compared to V2. Redefine
Data Model Declarative Import Import Import
Import
Definition Model Search Data RFC/BOR Data
You should now have basic knowledge about OData, its different query options, and (MPC) DDIC*
Definition Help* Model Interface Source
Include
different supported versions in SAP environment. We’ll now jump into the service Service
SAP
(GNIL,
development by using SAP Gateway Service Builder for your on-premise ABAP system. Gateway
BOL, SPI,
Service*
Service Map BW, Easy
Code Based Implementation*
Implementation RFC/BOR/Search Query,
(DPC) Code Based Extension*
Help Operations* MDX)
6.2 SAP Gateway Service Builder
SAP Gateway Service Builder (Transaction SEGW) is a design-time environment of SAP
Gateway, which enables developers to define, map, and implement OData services. Service Service
Developers can create a service leveraging multiple out-of-the-box features without Maintenance Registration

any need for programming. As shown in Figure 6.8, a typical OData service generated
using SAP Gateway Service Builder includes the following: Figure 6.9 Overview of Development Approach for SAP Gateway Service Builder
쐍 SAP Gateway runtime artifacts, such as a model provider class (MPC), data provider
class (DPC) model, annotation provider class (APC), and service Now let’s look at the high-level steps involved in the creation of an OData service (see
쐍 OData artifacts such as an entity set, an entity type, and properties Figure 6.10) and the steps you can perform in SAP Gateway Service Builder.

192 193
6 Creating OData Services 6.3 Modeling OData Services

There are several options under the Project Type dropdown menu:
쐍 Service with SAP Annotations
Performed in Use this type if the OData service in your project is to use standard SAP annotations:
Define Data SAP Gateway Creatable, Updatable, Label.
Project Creation Service Builder
Model
쐍 Service with Vocabulary-Based Annotations
Select this type if the OData service in your project is to use vocabulary-based anno-
tations. Standard SAP annotations aren’t available for this project type. In this case, 6
terms are consolidated in a vocabulary and uploaded into the vocabulary repository.
Generation of Service
쐍 Annotation Model for Referenced Service
Runtime Objects Implementation
When the OData service has to be annotated externally without modifying the ser-
vice, you can create and upload customer-specific vocabularies into the vocabulary
repository. The uploading of vocabulary files is an optional preparatory step as there
are standard-delivered vocabularies available.
Service
쐍 OData 4.0 Service
Registration and Test Service
Activation Use this type when you want to create an OData V4 service.

You’ll mostly be using the Service with SAP Annotation and Service with Vocabulary-
Based Annotation options for your OData V2 service developments, which are more
Figure 6.10 High-Level Steps to Develop OData Service
common in SAP Fiori application development. OData V4 is new and not frequently
used in older versions of SAP S/4HANA. The annotation model approach is used to add
To develop a service using SAP Gateway Service Builder, you first have to create a proj-
additional annotations for your existing service and can be helpful for developing SAP
ect. Projects bundle all the development artifacts of a service in one central place and
Fiori applications based on an existing service definition.
thereby help organize the service development and modeling process. A project also
helps you organize the transport of objects from one system environment to another In the next section, we’ll discuss the various options for modeling OData services from
so that all the artifacts always remain together. You can create four types of projects in SAP Gateway Service Builder.
Transaction SEGW, as shown in Figure 6.11.

6.3 Modeling OData Services


After you’ve created a project in SAP Gateway Service Builder, you need to define the
data model. In the data model, you define the various entity types and their properties
involved in that service. You may also need to define a complex data type (e.g., an
address) that you can reuse in multiple entity types.
At runtime, the data model is exposed to SAP Gateway services that trigger the opera-
tions and fields defined at design time and return the relevant data and fields to the
user. For example, you can create a data model that reads customers' names, addresses,
and contact details stored in an SAP system, and a sales representative can access this
data from a mobile device without logging into the SAP system directly.
You can use the following options to define a data model for OData services:
쐍 Data model definition via a declarative method
Figure 6.11 Types of Projects Supported in SAP Gateway Service Builder
쐍 Importing a data model

194 195
6 Creating OData Services 6.3 Modeling OData Services

쐍 Redefining an OData service


쐍 Including an OData service

In the following sections, we’ll discuss these options in detail.

6.3.1 Defining a Data Model


In SAP Gateway Service Builder, you can define a new data model within your project to 6
meet your exact service requirements based on the data you want to expose at run-
time. Figure 6.12 illustrates the various tasks to perform to define a data model from
scratch. These tasks include creating an entity type and entity set, creating an associa-
tion for an existing entity, optionally creating association sets, performing function
imports, and setting up complex types for your varied requirements.

Entity
Types

Entity Sets

Figure 6.13 Entity Types


Association

쐍 Entity Sets
Association An entity type describes a data structure, and an entity set contains the instances of
Sets the given structure. Figure 6.14 shows all the entity sets and their corresponding
entity types.
Function
Import

Complex
Types

Figure 6.12 Different Tasks for Defining Data Models Figure 6.14 Entity Sets

We’ve created a Transaction SEGW project with of the service with SAP annotations 쐍 Association
types. So now let’s discuss the various elements of the project in detail: An association is a named relationship between two entities. An association defines
a peer-to-peer relationship between participating entity types. An example of an
쐍 Entity Types
association is the relationship between the Customer and Sales Order entity types.
Entity types in SAP Gateway Service Builder projects describe the structure of data in
쐍 Association Set
the Entity Data Model (EDM). Entity types represent a specific type of data. Figure
An association set specifies a relationship between two entity sets, such as Custom-
6.13 shows the definition of entity types and the properties of the same.
ers and Sales Orders. For example: one customer will have N sales orders. Figure 6.15
shows the different associations within this data model.

196 197
6 Creating OData Services 6.3 Modeling OData Services

To meet this requirement, we’ll start with project creation and two entity types, one for
customer and another one for sales order, and we’ll define their necessary properties.
Figure 6.18 shows the basic project information, such as the project name, package
name, and project type.

6
Figure 6.15 Association between Entity Types

쐍 Function Import
OData includes standard CRUD operations that map to the POST, GET, PUT/MERGE, and
DELETE HTTP methods. OData supports function imports that can be invoked by the
GET or POST HTTP methods for anything that can’t be mapped to the standard CRUD
operations, such as confirming/canceling a sales order line item, as shown in Figure
6.16.

Figure 6.16 Function Import Figure 6.18 Project Creation

쐍 Complex Types Once you create your project, you need to create one or more entity types by selecting
Complex types consist of a collection of properties without a unique key. These can Data Model • Create • Entity Type from the context menu, as shown in Figure 6.19.
only exist as properties of a containing entity or, outside an entity, as temporary val-
ues. Figure 6.17 shows the definition of complex types and their reference within an
entity type.

Figure 6.17 Complex Types and Reference within Entity Type


Figure 6.19 Create Entity Type
Now we’ll develop a data model following this approach. Say you need to develop an
OData service exposing basic customer information (customer number, name, street In the next step, you enter the entity type name. You can optionally select the Create
address, city, state, country, list of sales orders in the past six months, sales order cre- Related Entity Set option and enter the name of the entity set (see Figure 6.20) to auto-
ation date, and sales order net value). matically create the related entity set for this entity type. This will eliminate one extra
manual step of creating the entity set.

198 199
6 Creating OData Services 6.3 Modeling OData Services

Figure 6.23 Definition of Properties for Sales Order Entity


6
Next, you need to relate these two entity types. For our requirements, you need to dis-
play customer details and the sales orders created for the customer. So let’s create an
association in which we define the customer as the principal entity and the sales order
Figure 6.20 Entity Type and Sets for Customer as a dependent entity. Also, as one customer may have multiple orders, let’s define the
cardinality as 1:N. Figure 6.24 displays the first step of creating an association via the
Figure 6.21 shows the different properties of an entity type (here, Customer). Each prop- context menu for Data Model.
erty must have a data type and several other attributes, such as filter-enabled, label, cre-
atable, updatable, sortable, and so on.

Figure 6.21 Definition of Properties for Customer Entity

Figure 6.22 shows another entity type and entity set you can create as a part of this
exercise.

Figure 6.24 Association Creation

Figure 6.25 shows the creation of an association between the customer and sales order.

Figure 6.22 Entity Type and Set for Sales Order

As shown in Figure 6.23, define different properties and their attributes for the second Figure 6.25 Definition of Association between Customer and Sales Order
entity, Sales Order.
Click Next to display the principal entity and dependent entity, as shown in Figure 6.26.

200 201
6 Creating OData Services 6.3 Modeling OData Services

Importing a Data Model


You import a data model by uploading a metadata file (EDMX or XML).
The File Import function gives you the flexibility to import data model files defined by
external model editors like Visual Studio (EDMX files) and the metadata file types
(XML) into SAP Gateway Service Builder to create a data model. You can also use the
same method when you need to develop a data model similar to an existing one.
Figure 6.26 Principal Entity and Dependent Entity Let’s build a data model following this approach. After creation of the project, you need 6
to select the import option. Right-click the Data Model folder under your project, then
Click Next to create an association set, as shown in Figure 6.27. select Import • Data Model from File, as shown in Figure 6.29.

Figure 6.27 Association Set

Click Finish in the association set–related screen shown in Figure 6.27, and the system
Figure 6.29 Data Model Creation Using Import File
will create the related association and association set, as shown in Figure 6.28.

Next, you need to select the metadata file you want to import. There are two radio but-
tons on this screen, Custom Import and Full Import, as shown in Figure 6.30. If you
already have an existing project with defined entities and you want to overwrite that
with new entities from a file, you can use the custom import option. Here, we’re using
a new project with no previously defined entities, so the custom import option is dis-
abled. Select Full Import and then use the Browse button on the Browse File field to
locate your metadata file. This metadata file must be available on your computer prior
to executing these steps. Depending on your scenario, this metadata file can be down-
loaded from other SAP or non-SAP OData service definitions.
Figure 6.28 Association and Association Set

Now you’ve completed the data modeling portion of this requirement. Next, you need
to implement the service, which we’ll cover later in Section 6.4.

6.3.2 Importing Data Model


If you want to reuse an existing data model instead of defining a new data model, you
have the following different options: importing a data model using a metadata file,
importing a DDIC structure, or using an RFC/BOR interface. Let’s go over the details for
each of the options.

Figure 6.30 Metadata File Section

202 203
6 Creating OData Services 6.3 Modeling OData Services

You need to confirm that the content of the metadata is correct, as shown in Figure 6.31, Importing a DDIC Structure
and click Finish. Import a DDIC structure to reuse an existing ABAP structure as a complex type or
entity type.
This feature helps reduce the time required to create complex types and entity types in
a data model. The import DDIC structure option can import an existing ABAP (DDIC)
structure that you can reuse to create new complex types and entity types with ease.
You can import the following DDIC structures into SAP Gateway Service Builder: 6
쐍 Views
쐍 Database tables
쐍 Structures

Let’s quickly develop a data model with step-by-step instructions. We’ll start with an
import wizard, as shown in Figure 6.33.

Figure 6.31 Confirming Data Model to Be Imported

Figure 6.33 Import DDIC Structure


After the wizard is finished, you’ll see that the data model was created, as shown in Fig-
ure 6.32. In the next step, you’ll select whether to create an entity type or complex type and
choose the reference DDIC structure, as shown in Figure 6.34. Entity types are required
for your service definition, and complex types can be used by one or more attributes of
entity types.

Figure 6.32 Newly Created Data Model Using Imported Metadata File Figure 6.34 DDIC Structure Reference

204 205
6 Creating OData Services 6.3 Modeling OData Services

If needed, you can avoid creating an entity type by selecting the Complex Type option. After completing the wizard, the data model will be generated, as shown in Figure 6.37.
In that case, you may need to manually create the entity type to refer to this complex
type. In addition, the Create Default Entity Set option, shown in Figure 6.34, will reduce
your effort by automatically creating an entity set for the entity type if needed.
Depending on your requirements, you may or may not need all the fields from the
DDIC structure. In this example, we’re not interested in all the available fields, so we
select only the fields we need, as shown in Figure 6.35.
6

Figure 6.37 Generated Data Model

Now let’s look at importing a data source (an RFC/BOR interface). This approach
reduces the time required to create entity types in the data model. The Import • RFC/
BOR Interface function can import an existing data source and reuse this data to create
new entity types with less manual effort. Start with the wizard, as shown in Figure 6.38.
Figure 6.35 Selection of Fields Needed

In the next step, you’ll select the key fields for the entity type, as shown in Figure 6.36.
Determination of the key fields will be dependent on your design, and you may need to
spend time analyzing that before you determine the key fields.

Figure 6.38 Import RFC/BOR to Generate Data Model

Next you need to fill out the Entity Type Name field, select Remote Function Call or
Business Object under Type, and enter the name of the data source to generate the data
model, as shown in Figure 6.39. Here we’re using the current system and thus selected
the Local option for Target System, as shown in Figure 6.39. We also entered “BAPI_
CUSTOMER_GETDETAIL2” for the RFC data source to use.
Figure 6.36 Confirming Key Fields

206 207
6 Creating OData Services 6.3 Modeling OData Services

Figure 6.41 Select Necessary Attributes of Entity Type


Figure 6.39 Data Model Creation Using Import RFC Wizard
After completion of the wizard, you’ll see that the data model is generated, as shown in
Next, select the fields needed for the entity type, as shown in Figure 6.40. The number Figure 6.42.
of fields required for the entity type can be a subset of the available fields, depending
on your requirements.

Figure 6.42 Generated Data Model Using Imported RFC/BOR


Figure 6.40 Select Required Entity Types

Another option is to import search help and associate it with the model so that you can
Now you need to select the fields that need to be the keys for the entity, as shown in Fig-
reuse it in you project. You can reuse existing search helps in a system as data sources
ure 6.41. Determining key fields is one of the primary design elements of defining the
to create new entity types.
OData service, and it’s also dependent on your backend data modeling.

208 209
6 Creating OData Services 6.3 Modeling OData Services

To begin, start the wizard by right-clicking Data Model and selecting Import • Search
Help, as shown in Figure 6.43.

Figure 6.45 List of Fields for Entity Types

Figure 6.43 Data Model Creation Using Existing Search Help

Next you need to provide the Entity Type Name and enter the Name of the search help
you’re using to generate the data model, as shown in Figure 6.44.

Figure 6.46 Key Fields for Entity Types

After completion of the wizard, you’ll see that the data model is generated, as shown in
Figure 6.47.

Figure 6.44 Entity Type and Search Help Names

Now select the fields that need to be part of the entity types for the entity type as shown
in Figure 6.45. The number of selected fields will be a subset of the available fields,
depending on your requirements.
Next, select the fields that need to be keys for the entity, as shown in Figure 6.46. Again,
determination of key fields is a design element and significantly dependent on back-
end data and your requirements.
Figure 6.47 Generated Data Model Using Imported Search Help

210 211
6 Creating OData Services 6.3 Modeling OData Services

Next we’ll discuss how to redefine an existing OData service.

6.3.3 Redefining OData Services


We redefine SAP Gateway services in the following scenarios:
쐍 To redefine a service for the first time in SAP Gateway Service Builder.
쐍 To extend the current model by adding more artifacts to it. A few of the common use
6
cases for this are as follows:
– Adding new fields to an existing entity
– Adding a new entity
– Adding a new function import
– Adding an association and a navigation property
Figure 6.49 Selecting Existing Service to Redefine
쐍 To overwrite the existing model in SAP Gateway Service Builder with a new model
from a different service.

In this section, we’ll discuss how to redefine a service in an empty project for the first
time. To begin, start the wizard by right-clicking Data Model and selecting Redefine •
OData Service (SAP GW), as shown in Figure 6.48.

Figure 6.48 Redefine Service

Next you need to select the reference OData service, as shown in Figure 6.49. This is the
existing service you want to redefine with additional functionality. Here we selected a
standard SAP service, SRA020_PO_TRACKING_SRV, as an example.
Figure 6.50 Selecting Entity Sets to Be Redefined
Now select the artifacts you need in your new service, as shown in Figure 6.50. The new
service may or may not need all the entity sets. Here, we selected four entity sets as an After completion of the wizard, you’ll see that the data model is generated, as shown in
example: POItemDetailData, SupplierInfo, PODetailedData, and POItem. These are the Figure 6.51.
entity sets that need redefinition with new or enhanced logic or fields.

212 213
6 Creating OData Services 6.3 Modeling OData Services

Figure 6.53 Selection of OData Service


6

Now we can see, under Model References in the data model tree, that the material
OData service is added, as shown in Figure 6.54.

Figure 6.51 Generated Data Model Using Redefined OData Service


Figure 6.54 Model Reference

6.3.4 Including an OData Service Next you need to create the association using the model reference. For that, we came to
When you’re creating a new OData service for a business need, it’s very common to add the association mass maintenance editor from the data model and provided the name.
a list of different types of master data. For example, to develop a custom purchase order Then, click External Association Editor, as shown in Figure 6.55, and select the model
application, you need to have a list of products, suppliers, purchase organizations, and reference that was added in the previous step.
so on. For most of these, SAP-standard OData services already exist. By including an
OData service, you can link to an existing model’s list instead of recreating it.
Let’s look at an example. We’ll be adding the material OData service to the purchase
order service. To begin, start the wizard by right-clicking Data Model and selecting
Include • OData Service (SAP GW), as shown in Figure 6.52.

Figure 6.52 Include OData Service as Reference

Next, select the existing OData service to be included as a part of this new service defi- Figure 6.55 External Association Creation Using Model Reference
nition. In this case, include the MDG_MATERIAL_SRV service, as shown in Figure 6.53.

214 215
6 Creating OData Services 6.4 Service Implementation

Now you need to add the principal entity and the dependent entity. In this case, the
dependent entity is from the reference model. As shown in Figure 6.56, in the Depen-
dent Entity dropdown, you can see all the entities from the model reference. Here you
need to select the one that addresses your requirements. Because you’re defining an
association between the PO and material, select Material, as shown in Figure 6.57.
Once the correct entities and cardinality are selected, you can see that the association
was created, as shown in Figure 6.57.
6

Figure 6.58 Service Implementation

Figure 6.56 Entity Selection from Model Reference

Figure 6.57 Association to Master Data Using Model Reference

6.4 Service Implementation


After you’re done with the creation of the data model, next you need to work on the
service implementation part. This contains references to the operations and the meth-
ods for the service. The subtree looks as shown in Figure 6.58.
Figure 6.59 Model and Service Generation
Now, let’s discuss at a high level how to perform the service implementation part. But
before that, let’s generate the DPC and MPC by clicking the Generate option available in
the application toolbar. That option will open a popup screen, as shown in Figure 6.59, 6.4.1 Redefining Methods of the Operations
highlighting the names of the classes to be generated.
You can redefine the methods generated for the extension class of the DPC. For each
entity set, under the Service Implementation folder, you’ll see the methods for the
operations. There is one method for each of the following operations: create, read,
update, delete, and query, as shown in Figure 6.58. You can select the method related to
the operation of an entity set that you need to implement (see Figure 6.60) and rede-
fine a method by adding your own code to achieve your requirements, as shown in Fig-
ure 6.61.

216 217
6 Creating OData Services 6.4 Service Implementation

쐍 RFCs
쐍 Business object repositories (BORs)

Let’s walk through an example in the system. We’ll be using the EPM sales order exam-
ple for this. First, start the wizard by right-clicking Service Implementation and select-
ing SalesOrderSet • GetEntitySet (Query) • Map to Data Source, as shown in Figure 6.62.

Figure 6.60 Redefine Method for Service Implementation

Figure 6.62 Map to Data Source for Service Implementation

Next, you need to map the RFC or business object, as shown in Figure 6.63. In this exam-
ple, we used a standard EPM RFC function, BAPI_EPM_SO_GET_LIST.

Figure 6.61 Override Methods in DPC Extension Class

6.4.2 Mapping a Data Source


Mapping is performed between the parameters of a data source object from the SAP
backend system and the properties of an entity set in SAP Gateway Service Builder. SAP
Gateway Service Builder enables you to map the data source for each of the CRUD oper-
ations and the query operation. In SAP Gateway Service Builder, the following data Figure 6.63 Map Data Source to RFC
sources are allowed:

218 219
6 Creating OData Services 6.5 Registering an OData Service

Now, you need to map the RFC function’s fields to the entity type’s fields by dragging Once the mapping is completed, the service implementation tree will look as shown in
the RFC field and dropping it onto the entity type. The final mapping is shown in Figure Figure 6.67.
6.64, with an arrow for each field. The arrow means the field is mapped to a target entity
type field.

Figure 6.64 Map Entity Properties to Remote Function

In the same way, for the GetEntity method, map to the data source, as shown in Figure
6.65, and perform mapping, as shown in Figure 6.66.

Figure 6.67 Generated Mapping in Service Implementation Using Data Source

In the same way, you can select the appropriate business object or remote function to
implement create or update methods as well. As a part of your whole OData service
design, you need to first analyze your backend functionality and determine the remote
function or business object to be responsible for create, update, or get functionality.
Now that we’ve explained various aspects of creating an OData service, next we’ll dis-
cuss how to register and test the OData service.

Figure 6.65 Map Data Source to RFC

6.5 Registering an OData Service


Once you finish defining the service, you need to register it for use in each SAP Gateway
system. Follow these steps:
1. Go to Transaction /IWFND/MAINT_SERVICE and add your newly created service by
using the Get Service option, as shown in Figure 6.68.

Figure 6.66 Map Entity Properties to Remote Function

Figure 6.68 Select Option to Add OData Service

220 221
6 Creating OData Services 6.6 Testing an OData Service

2. On the next screen, enter the backend system alias in which the service is exposed. Your service should now be registered and activated, as highlighted in Figure 6.71. You
You can optionally provide the service name (full or partial with wildcard) to search can now test your service, which we’ll explain in the next section.
for the service, as shown in Figure 6.69.

Figure 6.69 Add OData Service for Registration Figure 6.71 Service Registration and Activation

3. On the next screen, most of the details will be autopopulated, as shown in Figure 6.70.
You can additionally enter the Package Assignment, select Set Current Client as Default 6.6 Testing an OData Service
Client in ICF Node, and, optionally, select Enable OAuth for Service (see Figure 6.70).
Once the service is registered and activated, next you need to test the service before
you hand it over to the frontend SAP Fiori developer for service consumption. To test
an OData service, select the OData service in Transaction /IWFND/MAINT_SERVICE and
then click SAP Gateway Client. This will open Transaction /IWFND/SUTIL_GW_CLIENT
for testing the OData service, as shown in Figure 6.72.

Figure 6.72 Test OData Service

SAP Gateway Client should prepopulate your service name along with the service path,
as shown in Figure 6.73. You should now select the entity sets by clicking EntitySets and
then selecting the entity set to be tested. Once you select your entity set, you can exe-
cute it to get a list of sales orders, as shown in Figure 6.73. This is a simple OData get call
to retrieve the data, so you don’t need to enter a payload for execution. For creating or
updating any entity sets, you need to properly enter the payload either in XML or JSON
Figure 6.70 Add Additional Parameters format in the blank area available to the left of the screen, highlighted in Figure 6.73.

222 223
6 Creating OData Services 6.7 Generating an OData Service from a CDS View in SAP S/4HANA

We’ve now explained different code-based OData service implementation options. But
in SAP S/4HANA, you have a better choice: creating an OData service directly from a
CDS view! Let’s explore that concept next.

6.7 Generating an OData Service from a CDS View in SAP S/4HANA


As you know, CDS views are one of the most commonly used database artifacts in SAP 6
S/4HANA, and very often you need to expose CDS views as OData services for con-
sumption in SAP Fiori or for partner applications. In this section, we’ll cover the various
options to expose CDS views as OData services.

6.7.1 Autoexposure Using Annotations


Let’s assume that you created a CDS view joining multiple views and need to expose
this data as an OData service. To achieve this, you can easily add an annotation. Figure
6.75 shows how to add the @OData.publish : true annotation to autoexpose the CDS
view.

Figure 6.73 List of Sales Orders in SAP Gateway Client

As shown, you get the list of sales orders. Now, if you want to see the details of a partic-
ular sales order, you can test the same service with the sales order number set in paren-
thesis, as shown in Figure 6.74. This brings up all the related attribute values defined for
the sales order entity for that sales order—here, sales order 500000002—as shown in
Figure 6.74.

Figure 6.75 Autoexposure of CDS View Using Annotation

You should not use the autoexposure option if:


쐍 Your data model composition is more complex and you need to include deeper
association levels in your OData service
쐍 You want to generate a hybrid scenario where implementations are based on CDS
views and on custom logic

Figure 6.74 Get Details for Particular Sales Order

224 225
6 Creating OData Services 6.7 Generating an OData Service from a CDS View in SAP S/4HANA

As shown in Figure 6.76, the main components of the autoexposure process refer to the
most important activities that are involved. After adding the annotation, you need to
launch Transaction /IWFND/MAINT_SERVICE to register the OData service to the ser-
vice catalog of the SAP Gateway hub, as discussed in Section 6.5. After this step, the
OData service is ready for consumption.

SAP NetWeaver
6

Service Catalog

RFC or LOCAL Figure 6.77 OData Service from CDS Using Reference Data Source

SAP NetWeaver Activate


Application Server ABAP Service
(Backend)

CDS OData
ABAP Development Tools
Runtime

CDS Data Definition Editor


Figure 6.78 Select the CDS Entity to Use as a Reference

Edit/Save

@OData.publish:true Activate CDS Data
Service
define view … Definition
Artifact

Figure 6.76 Components of Autoexposure of CDS View Using Annotation

This approach is simple, but it lacks an option to add complex coding that may be
required for one or more fields. The next section will highlight how to overcome this
limitation.

6.7.2 Based on Reference Data Source


You can also generate an OData service on the basis of the data source reference. To do
so, first start the wizard by right-clicking Data Model and selecting Reference • Data
Source, as shown in Figure 6.77.
Next, select the CDS entity you want to use as a reference, as shown in Figure 6.78.
Figure 6.79 Select the Required Associations of the Selected CDS
Now select the associations and compositions you need to expose as OData, as shown
in Figure 6.79.
After the wizard is completed, the data model generated will look as shown in Figure
6.80. You also can add further CDS entities in the same model in the same way.

226 227
6 Creating OData Services 6.7 Generating an OData Service from a CDS View in SAP S/4HANA

Now the service and model are generated. Because you’re generating the DPC and MPC
classes, you can enhance their implementation to address complex data-retrieval logic.
Once your service definition is fully implemented, you need to launch Transaction
/IWFND/MAINT_SERVICE to register the OData service to the service catalog of the SAP
Gateway hub, as shown in Section 6.5. After this step, the OData service is ready for con-
sumption.

6
6.7.3 OData Service Based on Mapped Data Source
You also can create OData service from a CDS view using a mapped data source. Say that
you have the CDS view shown in Figure 6.82.

Figure 6.80 Generated Data Model

After the data model is completed, you can generate the service, and it will prompt you
for the DPC, MPC classes, and model and service names. Enter those as per your naming
conventions, as shown in Figure 6.81.
Figure 6.82 CDS View to Be Exposed as OData Service

You can see the ABAP view name here, and you’ll use that to import the entity type, as
shown in Figure 6.83 and Figure 6.84.

Figure 6.83 Data Model Creation Using DDIC Structure Option for CDS View
Figure 6.81 Model- and Service-Related Technical Details

228 229
6 Creating OData Services 6.7 Generating an OData Service from a CDS View in SAP S/4HANA

Figure 6.84 Create an Entity Type Referencing the ABAP Structure of the CDS
Figure 6.86 Select CDS to be Mapped to Entity Type
After the import is completed and the data model is generated, you need to work on the
service implementation part. For that, right-click the entity set name under the Service
Implementation folder and choose Map to Data Source, as shown in Figure 6.85.

Figure 6.85 OData Service Creation Using Map to Data Source Option for CDS View Figure 6.87 Select CDS Business Entity (Highlighted as CDS~<CDS Name>)

Next, select Business Entity from the Type dropdown. For the Name field, we will be Next, you need to perform the mapping as shown in Figure 6.88.
using the search help. Select CDS Core Data Services as SADL Model Type and enter the
view name in the SADL Model field, as shown in Figure 6.86.
After the data entry from the previous step, the Map to Data Source window will open,
as shown in Figure 6.87.

Figure 6.88 OData Service Creation Using Mapping Editor

230 231
6 Creating OData Services 6.8 ABAP RESTful Application Programming Model and OData

Finally, you can save the project and click the Generate button. This will open the win-
dow shown in Figure 6.89, in which you can enter technical details for the DPC, MPC, SERVICE SAP Fiori UI WEB API
CONSUMPTION Consume OData UI Services Consume OData Web APIs
model, and service.
SERVICE BINDING
Bind to Protocol Version and Scenario

SERVICE DEFINITION
BUSINESS Definition Scope to be Exposed
SERVICES 6
PROVISIONING Business Object Projection

CDS: Projection Views


BDEF: Behavior Projection
ABAP: Behavior Implementation

Business Objects Queries


DATA
MODELING & CDS: Data Modeling
CDS: Data Modeling
BEHAVIOR BDEF: Behavior Definition
ABAP: Behavior Implementation

Figure 6.90 Architecture of ABAP RESTful Application Programming Model

As you can see in Figure 6.90, the model has three distinct layers—data modeling and
behavior, business service provisioning, and service consumption:

Figure 6.89 Model- and Service-Related Technical Details 쐍 In the data modeling and behavior layer, you model your data using different CDS
views and link them using associations. This is the layer for creating business
Now the service and model are generated. Next you need to launch Transaction objects. In addition, you can add behavior definitions and implementation for cre-
/IWFND/MAINT_SERVICE to register the OData service to the service catalog of the SAP ate, change, and delete scenarios.
Gateway hub, as discussed in Section 6.5. After this step, the OData service is ready for 쐍 In the business service provisioning layer, you project a subset of your business
consumption. object created in the data modeling layer. In addition, you can define the scope of
We’ve explained a couple of different ways of creating OData services in this chapter, your service and bind your service to a protocol (OData V2 versus V4).
but let’s discuss one more. SAP recently introduced the ABAP RESTful application pro- 쐍 The service consumption layer determines whether the service is a UI service or a
gramming model in SAP S/4HANA and SAP BTP, ABAP environment. So now we’ll pro-
web API.
vide an overview of creating OData services in this model.
There are different types of applications you can develop using ABAP RESTful applica-
tion programming model: read-only list report applications, managed transactional
6.8 ABAP RESTful Application Programming Model and OData applications, unmanaged transactional applications, draft applications, and so on. In
addition, you can simply expose CDS views as web APIs. We won’t go over all the types
The ABAP RESTful application programming model is the primary programming
of applications here, as this chapter is focused on OData services. So, we’ll simply
model for SAP S/4HANA for efficient end-to-end development of SAP HANA–opti-
explain how you can expose your CDS view as a web API so that it can be consumed by
mized OData services and SAP Fiori apps. This programming model helps ABAP devel-
any external application. Let’s go over the steps:
opers to develop all types of SAP Fiori applications and to publish web APIs. These web
APIs are nothing but OData services, so we’ll cover them to some extent here. This pro- 1. As a prerequisite, please make sure you have an SAP S/4HANA on-premise system
gramming model is based on CDS and follows a layered development approach, as available, and its version should be 1909 or above. In addition, you should have ADT
shown in Figure 6.90. An OData service is exposed that can be consumed by an SAP or installed on your local computer and able to connect to your development client.
a third-party application or can be used to build a frontend application.

232 233
6 Creating OData Services 6.8 ABAP RESTful Application Programming Model and OData

2. Your CDS view should be available with all its attributes, associations, and the like. 4. Now create a service binding. Again, ADT will provide an option to create a service
Figure 6.91 displays a simple CDS view created from sales order header table VBAK. binding, as you see in Figure 6.93. While creating a service binding, you can select
OData V2 or OData V4, as shown in Figure 6.94. The resulting service binding should
look as shown in Figure 6.95.

Figure 6.94 OData V2 or V4

Figure 6.91 Simple CDS View

3. Next, create a service definition. You can create this object from ADT, as shown in Fig-
ure 6.92. Figure 6.93 displays a service definition created for the example CDS view.
Figure 6.95 Service Binding

5. You can now publish your binding by clicking the Publish option. After publishing,
the status will have changed appropriately, as shown in Figure 6.96.

Figure 6.92 Service Definition Option in ADT

Figure 6.96 Published Service Binding


Figure 6.93 Service Definition

234 235
6 Creating OData Services

6. Once you publish your service, you can activate the service using Transaction
/IWND/MAINT_SERVICE, and then your service is ready to be consumed.

As you can see, we haven’t defined any behavior definition or behavior implementa-
tion. We didn’t even create a projection view as we want to keep this example very sim-
ple. However, you can build complex web APIs or complex applications by utilizing
various application development patterns available with the ABAP RESTful application
programming model.
That wraps up the ABAP RESTful application programming model and OData overview.
Now let’s briefly go over another important topic related to OData services: annota-
tions.

6.9 Annotations and Their Importance in SAP Fiori


Annotations are additional metadata that can be added to various levels of OData enti-
ties; annotations can be added to the element level, entity set level, or even the whole
service. In Section 6.7.1, you learned about how the @OData.publish : true annotation
helps expose a CDS view as an OData service. This is one example of an annotation.
Depending on the type of an annotation, it will be evaluated and interpreted by various
consumers. For example, ABAP-specific annotations are interpreted by the ABAP run-
time, analytics-specific annotations are evaluated by the analytics engine, UI-specific
annotations are evaluated by the SAPUI5 framework, and so on. SAP has invested sig-
nificant effort into building various annotations, and UI annotations play a significant
role in building SAP Fiori applications with a low-/no-code approach. We’ll explain in
Chapter 9 how annotations can be used to build complex SAP Fiori applications (with
SAP Fiori elements). We’ll also explain annotations in Appendix C with respect to the
SAP Cloud Application Programming Model and the ABAP RESTful application pro-
gramming model.
Let’s now summarize what you’ve learned from this chapter.

6.10 Summary
OData is the primary way to consume the backend data for SAP Fiori applications. Both
OData V2 and V4 are supported, though V4 may have certain limitations depending on
your backend release. SAP provides different options to build OData services, such as
code-based implementation using Transaction SEGW, no-code implementation from
CDS views, and so on. Using OData helps frontend developers to build query-like oper-
ations to consume backend data in a consistent way, thus simplifying the overall ser-
vice-consumption approach.

236
Contents

Preface ....................................................................................................................................................... 15

1 Introduction 19

1.1 User Experience with SAP .................................................................................................. 19


1.1.1 SAP’s User Experience Strategy ......................................................................... 20
1.1.2 Design Principles .................................................................................................... 22
1.1.3 Evolution of SAP Fiori ............................................................................................ 23
1.2 SAP Fiori Architecture .......................................................................................................... 23
1.2.1 Frontend Server ....................................................................................................... 24
1.2.2 Backend System ...................................................................................................... 25
1.2.3 SAP Web Dispatcher .............................................................................................. 25
1.2.4 SAP Fiori Launchpad .............................................................................................. 25
1.2.5 Cloud Components ................................................................................................ 31
1.3 Application Types and the Application Library ........................................................ 32
1.3.1 Transactional Apps ................................................................................................ 33
1.3.2 Analytical Apps ........................................................................................................ 33
1.3.3 Object Page ............................................................................................................... 36
1.3.4 SAP Fiori Apps Reference Library ....................................................................... 37
1.4 Development Tools and Technology ............................................................................ 43
1.4.1 Integrated Development Environments ......................................................... 43
1.4.2 SAP Fiori Tools .......................................................................................................... 44
1.4.3 UI Technology .......................................................................................................... 50
1.4.4 Rapid OData Service Development .................................................................. 52
1.4.5 Mobile SDKs ............................................................................................................. 53
1.4.6 Conversational User Experience ........................................................................ 56
1.4.7 UI Adaption and Extension ................................................................................. 56
1.5 Summary ................................................................................................................................... 57

2 Installation and Configuration 59

2.1 Prerequisites ............................................................................................................................ 59

2.2 Deployment Options ............................................................................................................ 63


2.2.1 On-Premise Deployment ..................................................................................... 63
2.2.2 Central Launchpad on SAP Business Technology Platform ...................... 69

7
Contents Contents

2.3 Installation ............................................................................................................................... 70 4.2.1 Activating the SAPUI5 Component .................................................................. 118
2.3.1 SAP Fiori Frontend Server ..................................................................................... 71 4.2.2 Activating the OData Services ............................................................................ 122
2.3.2 SAP Web Dispatcher .............................................................................................. 76 4.2.3 Frontend Roles ......................................................................................................... 131
2.3.3 SAP Fiori Client ........................................................................................................ 77 4.3 Backend Implementation Tasks ...................................................................................... 154
2.4 Configuration .......................................................................................................................... 77 4.3.1 Assigning RFC Authorization to Users ............................................................. 154
2.4.1 SAP Fiori Initial Setup ............................................................................................ 78 4.3.2 Creating Authorization Roles for Catalogs .................................................... 154
2.4.2 Communication Channels ................................................................................... 82 4.4 Rapid Activation of SAP Fiori Applications in SAP S/4HANA ............................. 156
2.4.3 Setup of SAP Fiori Launchpad ............................................................................. 92
4.5 Running Applications .......................................................................................................... 162
2.4.4 Setup of SAP Fiori Search ..................................................................................... 93
4.5.1 SAP Fiori Launchpad from End User Perspective ......................................... 162
2.4.5 Optional Configuration ........................................................................................ 93
4.5.2 Personalizing and Adapting Apps ..................................................................... 163
2.5 Getting the Latest SAP Fiori Design in Your System Landscape ....................... 93 4.5.3 Personalizing the Launchpad ............................................................................. 164
2.5.1 Preupgrade Considerations ................................................................................ 94
4.6 Summary ................................................................................................................................... 164
2.5.2 Upgrading an Existing SAP Fiori Landscape .................................................. 94
2.6 Summary ................................................................................................................................... 99

5 Enabling Analytical Applications 165

3 Security 101
5.1 Architecture and Overview of Embedded Analytics in SAP S/4HANA ........... 166

5.2 Embedded Analytics Tools ................................................................................................. 168


3.1 Authentication ........................................................................................................................ 101
5.2.1 View Browser ........................................................................................................... 168
3.1.1 Kerberos and SPNEGO .......................................................................................... 102
5.2.2 Query Browser ......................................................................................................... 170
3.1.2 X.509 Certificates ................................................................................................... 103
5.2.3 Custom CDS Views ................................................................................................. 171
3.1.3 SAML 2.0 .................................................................................................................... 104
5.2.4 Custom Analytical Queries .................................................................................. 172
3.1.4 SAP Logon Tickets ................................................................................................... 105
5.2.5 Multidimensional Reporting .............................................................................. 174
3.1.5 Choosing a Single Sign-on Mechanism ........................................................... 106
5.2.6 Manage KPIs & Reports ........................................................................................ 175
3.2 Mobile Application Security ............................................................................................. 107 5.2.7 Analysis Path Framework Applications ........................................................... 177
3.2.1 Communication Security ..................................................................................... 107
5.3 Enabling Embedded Analytics in SAP S/4HANA ...................................................... 178
3.2.2 User Authentication and Single Sign-On ....................................................... 108
5.3.1 Configuration of the Analytic Engine .............................................................. 179
3.2.3 Secure Storage of Data on Device ..................................................................... 108
5.3.2 Configuration of Hierarchies for Time Characteristics .............................. 181
3.2.4 Access to Native Device Capabilities ............................................................... 109
5.3.3 Configuration of Design Studio Template ..................................................... 182
3.2.5 Data Protection and Privacy ................................................................................ 109
5.4 Summary ................................................................................................................................... 183
3.3 Summary ................................................................................................................................... 110

4 Enabling Standard Applications 111


6 Creating OData Services 185

6.1 Introduction to OData ......................................................................................................... 185


4.1 Configuring Users and Authorizations ........................................................................ 112
6.1.1 Overview .................................................................................................................... 185
4.1.1 Concept ...................................................................................................................... 112
6.1.2 Query Options ......................................................................................................... 186
4.1.2 Authorization Prerequisites ................................................................................ 117
6.1.3 OData Versions ....................................................................................................... 191
4.2 Frontend Implementation Tasks .................................................................................... 118
6.2 SAP Gateway Service Builder ........................................................................................... 192

8 9
Contents Contents

6.3 Modeling OData Services ................................................................................................... 195 8 Methods of SAP Fiori Application Development 257
6.3.1 Defining a Data Model ......................................................................................... 196
6.3.2 Importing Data Model .......................................................................................... 202
8.1 SAP Fiori Elements Framework ........................................................................................ 257
6.3.3 Redefining OData Services .................................................................................. 212
8.1.1 List Report ................................................................................................................. 259
6.3.4 Including an OData Service ................................................................................. 214
8.1.2 Object Page ............................................................................................................... 260
6.4 Service Implementation ..................................................................................................... 216 8.1.3 Analytical List Page ................................................................................................ 261
6.4.1 Redefining Methods of the Operations .......................................................... 217 8.1.4 Overview Page ......................................................................................................... 262
6.4.2 Mapping a Data Source ........................................................................................ 218 8.1.5 Worklist ...................................................................................................................... 264
6.5 Registering an OData Service ........................................................................................... 221 8.2 Freestyle Application Development .............................................................................. 265
6.6 Testing an OData Service ................................................................................................... 223 8.2.1 SAP Fiori Worklist Application ............................................................................ 265
8.2.2 SAP Fiori Master-Detail Application ................................................................. 266
6.7 Generating an OData Service from a CDS View in SAP S/4HANA ................... 225
8.2.3 SAPUI5 Basic Application ..................................................................................... 267
6.7.1 Autoexposure Using Annotations .................................................................... 225
6.7.2 Based on Reference Data Source ....................................................................... 226 8.3 Freestyle Development versus SAP Fiori Elements ................................................ 267
6.7.3 OData Service Based on Mapped Data Source ............................................. 229 8.4 Summary ................................................................................................................................... 268
6.8 ABAP RESTful Application Programming Model and OData .............................. 232

6.9 Annotations and Their Importance in SAP Fiori ....................................................... 236


9 Building and Extending SAP Fiori Elements
6.10 Summary ................................................................................................................................... 236
Applications 269

9.1 Building SAP Fiori Elements Applications ................................................................... 269


7 Working with SAP Business Application Studio 237
9.1.1 Determining Floorplans ....................................................................................... 270
9.1.2 Determining Data Sources .................................................................................. 272
7.1 Overview ................................................................................................................................... 237
9.1.3 Developing a List Report and an Object Page ............................................... 279
7.2 Capabilities ............................................................................................................................... 238 9.1.4 Developing Analytical List Pages ....................................................................... 297
7.3 Setting Up SAP Business Application Studio with SAP BTP ................................ 238 9.1.5 Developing Overview Pages ................................................................................ 309
9.1.6 Deploying Applications to the ABAP Backend Server ................................. 318
7.3.1 Subscribing to SAP Business Application Studio .......................................... 239
9.1.7 Deploying the Application to SAP BTP ............................................................. 321
7.3.2 Managing Authorizations ................................................................................... 240
9.2 Extending SAP Fiori Elements Applications ............................................................... 323
7.4 Developing Applications .................................................................................................... 243
9.2.1 Enhancements in Applications Specific to End Users ................................ 324
7.4.1 Creating a Project ................................................................................................... 243
9.2.2 Enhancement of Application for Group of Users ........................................ 328
7.4.2 Adding Source Code ............................................................................................... 245
9.2.3 Complex Enhancements that Need Changes in Business Logic ............. 331
7.4.3 Testing the Application ........................................................................................ 248
9.2.4 Deploying the Extended Application ............................................................... 335
7.4.4 Deployment Options ............................................................................................. 250
9.3 Summary ................................................................................................................................... 337
7.5 Migrating Projects from SAP Web IDE to SAP Business Application
Studio .......................................................................................................................................... 253

7.6 SAP Fiori Tools in SAP Business Application Studio ............................................... 255
10 Building and Extending Freestyle SAP Fiori
7.7 Summary ................................................................................................................................... 256
Applications 339

10.1 Building Freestyle Applications ....................................................................................... 339

10 11
Contents Contents

10.1.1 Floorplans .................................................................................................................. 339 12.3.2 Scopes for Adapting Launchpad Content ....................................................... 421
10.1.2 Data Sources ............................................................................................................ 341 12.3.3 Spaces and Pages .................................................................................................... 422
10.1.3 App Overview: The Basic Files of the Application ........................................ 341 12.3.4 Groups and Catalogs ............................................................................................. 427
10.1.4 List-Detail Application .......................................................................................... 342 12.3.5 Setting Up Navigation for a Custom Application ........................................ 427
10.1.5 Worklist Application .............................................................................................. 351 12.4 Personalization ....................................................................................................................... 431
10.1.6 SAPUI5 Application ................................................................................................ 357
12.4.1 End User App Personalization ............................................................................ 431
10.2 Extending Freestyle Applications ................................................................................... 361 12.4.2 Adapting SAP Fiori UIs at Runtime—Key User Adaptation ...................... 435
10.2.1 Extending SAP Fiori Applications in the SAP S/4HANA 12.4.3 Personalizing the Classic Home Page .............................................................. 436
Application Layer .................................................................................................... 361 12.4.4 Personalizing a Page .............................................................................................. 437
10.2.2 Extending SAP Fiori Applications in the OData Service Layer .................. 363 12.4.5 Adding Apps using App Finder ........................................................................... 438
10.2.3 Extending the UI Layer of a Freestyle SAP Fiori/SAPUI5 Application .... 370 12.5 Extensions ................................................................................................................................. 439
10.3 Summary ................................................................................................................................... 375 12.6 Security ...................................................................................................................................... 443
12.6.1 Role Configuration to Start Launchpad .......................................................... 443
12.6.2 Role Configuration for Catalogs, Groups, and Spaces ............................... 444
11 Building and Extending Analytical Applications 377 12.6.3 Additional Security Considerations .................................................................. 446
12.7 Summary ................................................................................................................................... 447
11.1 Creating Analytical Applications .................................................................................... 377
11.1.1 Creating CDS Views ............................................................................................... 377
11.1.2 Creating OData Service ........................................................................................ 381
13 SAP Screen Personas 449
11.1.3 Creating Custom Analytical Queries ................................................................ 382
11.1.4 Manage KPIs and Reports .................................................................................... 386
11.1.5 Creating Analysis Path Framework Applications ......................................... 395
13.1 Architecture and Components ........................................................................................ 450

11.1.6 Creating Multidimensional Reports ................................................................. 396 13.2 Navigation to SAP Screen Personas–Enabled Screens .......................................... 451
11.1.7 Manage Date Functions ....................................................................................... 401 13.2.1 Accessing SAP Screen Personas Using SAP GUI
11.2 Extending Analytical Applications ................................................................................. 403 (SAP GUI for Windows/Java) .............................................................................. 451
13.2.2 Accessing SAP Screen Personas Using Web GUI .......................................... 453
11.2.1 Extending CDS Views ............................................................................................ 403
11.2.2 Extending OData Services ................................................................................... 407 13.3 SAP Screen Personas versus SAP Fiori ........................................................................... 455
11.2.3 Configuring Analytical UIs ................................................................................... 409 13.4 Applying Elements of Screen Personas ........................................................................ 456
11.3 Summary ................................................................................................................................... 409 13.4.1 Creating a Flavor ..................................................................................................... 456
13.4.2 Creating and Applying a Theme ........................................................................ 460
13.4.3 Scripting ..................................................................................................................... 463
12 Configuring SAP Fiori Launchpad 411 13.5 Enabling SAP Fiori–Like Applications ........................................................................... 465
13.5.1 General Guidelines ................................................................................................ 466
12.1 Key Components .................................................................................................................... 412 13.5.2 Letterbox Theme ..................................................................................................... 466
13.5.3 Floorplans .................................................................................................................. 466
12.2 Initial Setup on ABAP Platform ....................................................................................... 414
13.5.4 Themes and Floorplans in Action ...................................................................... 467
12.2.1 Embedded Deployment ....................................................................................... 415
12.2.2 Hub Deployment .................................................................................................... 418 13.6 Maintenance and Administration .................................................................................. 471

12.3 Setting Up Content ............................................................................................................... 420 13.7 Summary ................................................................................................................................... 473


12.3.1 Entities ....................................................................................................................... 420

12 13
Contents

14 Integrating Conversational User Interfaces


with SAP Fiori 475

14.1 SAP Conversational AI ......................................................................................................... 475


14.1.1 Configuration .......................................................................................................... 476
14.1.2 Developing a Chatbot ........................................................................................... 478
14.2 SAP CoPilot ............................................................................................................................... 500

14.3 Summary ................................................................................................................................... 502

15 Creating Workflows for SAP Fiori 503

15.1 SAP S/4HANA Flexible Workflow ................................................................................... 503


15.1.1 Create a New SAP S/4HANA Flexible Workflow Scenario ........................ 504
15.1.2 Configure Flexible Workflows ............................................................................ 508
15.1.3 Configure and Use My Inbox .............................................................................. 511
15.2 SAP Workflow Management ............................................................................................ 514
15.2.1 Setup SAP Workflow Management .................................................................. 515
15.2.2 Workflow Application Development and SAP Fiori UX ............................. 517
15.2.3 Enterprise Workflow Strategy ............................................................................ 523
15.3 Summary ................................................................................................................................... 524

Appendices 525

A Working with SAP Web IDE .............................................................................................. 527

B SAP Fiori Development Using In-App Extension ..................................................... 545

C SAP Programming Models ................................................................................................. 555


D The Authors .............................................................................................................................. 561

Index .......................................................................................................................................................... 563

14
Index

/UI2/FLP_CONF ..................................................... 132 Analytical cube ...................................................... 382


/UI2/FLP_CUST ...................................................... 132 Analytical dimension ......................................... 383
$count ........................................................................ 190 Analytical list page ............................ 259, 270, 394
$expand .................................................................... 190 configure list ...................................................... 300
$filter .......................................................................... 190 development ...................................................... 297
$select ........................................................................ 189 entity selection ................................................. 299
$top ............................................................................. 190 filters ..................................................................... 305
interactive chart .............................................. 302
multiple visual filters ..................................... 308
A preview ................................................................ 304
ABAP CDS ................................................................. 171 sections ................................................................ 300
ABAP Development Tools (ADT) ............. 23, 171 visual filters ....................................................... 306
ABAP RESTful application programming Analytical queries
model .......................................................... 232, 555 fields ...................................................................... 383
architecture ........................................................ 233 filters ..................................................................... 384
CDS ......................................................................... 233 measures and dimensions ........................... 384
SAP Fiori apps .................................................... 559 publish ................................................................. 386
ABAP servers .............................................................. 83 Analytic engine
ABAP system ........................................................... 250 configuration .................................................... 179
Action ........................................................................ 137 Annotation provider class (APC) .................... 192
Activating OData ................................................... 122 Annotations ........................................................... 236
multiple apps ..................................................... 126 APF applications
Activating SAPUI5 component ....................... 118 create .................................................................... 395
Adaptive UX ............................................................... 22 App finder ...................................................... 414, 438
Analysis Path Framework (APF) ..... 33, 177, 395 App launcher tiles ................................................ 114
Analytical app authorizations ......................... 117 Application modeler .................................... 44, 255
Analytical applications .......................................... 32 Application testing .............................................. 248
analytical cube .................................................. 382 Application wizard ........................................ 44, 255
analytical dimension ...................................... 383 Architecture ............................................................... 23
analytical queries ............................................. 382 Authentication ............................................. 101, 108
analytical UIs ..................................................... 409 Authorizations ............................................. 112, 148
APF applications ............................................... 395 Autoexposure ........................................................ 225
cardinality ........................................................... 379
CDS view .............................................................. 377 B
CDS view extensions ....................................... 403
create OData service ....................................... 381 Backend implementation ................................. 154
data source ......................................................... 378 BAdIs .......................................................................... 361
development ...................................................... 377 Book structure .......................................................... 16
elements ............................................................... 379 Business catalogs ......................................... 131, 134
extensions ........................................................... 403 Business group ............................................. 131, 143
filter conditions ................................................ 380 Business object repositories (BORs) ............. 219
join conditions .................................................. 379
KPI modeler ........................................................ 386 C
manage date functions ................................. 401
Manage KPIs and Reports app ................... 386 Catalog
multidimensional reports ............................. 396 create .................................................................... 135
OData extensions ............................................ 407 Catalogs .................................................................... 113
parameters ......................................................... 379 CDS ............................................................................. 171
properties ............................................................ 380 autoexpose ......................................................... 225

563
Index Index

CDS view Descriptor (manifest.json) ................................. 341 Initial authentication .......................................... 101 M
cardinality ........................................................... 379 Design language ...................................................... 15 Integrated development environment
create .................................................................... 377 Design principles ..................................................... 22 (IDE) .......................................................................... 43 Maintaining annotations .................................. 255
data source ......................................................... 378 Design Studio Template ..................................... 182 with language server ......................................... 44
elements ............................................................... 379 Dev spaces ................................................................ 238 J Maintenance Planner .............................. 61, 72, 94
filter conditions ................................................ 380 Digital assistant ..................................................... 500 Manage KPIs and Reports app ................ 175, 386
join conditions .................................................. 379 Dimensions Java ................................................................... 238, 555 Manage Launchpad Settings ............................ 116
parameters ......................................................... 379 filters ...................................................................... 385 Manage Workflows app ..................................... 509
preview ................................................................. 381 Document Object Model (DOM) ....................... 85 K Mapping ................................................................... 218
properties ............................................................ 380 DPC .............................................................................. 217 Metadata documents .......................................... 276
publish .................................................................. 381 Kerberos ................................................................... 102 Mobile security ..................................................... 107
Central hub deployment ...................................... 63 Key pairs ................................................................... 103
Chatbots ................................................................... 475
E Model provider class (MPC) ............................. 192
Key performance indicators (KPIs) ................... 33 MTA ............................................................................ 321
development ...................................................... 478 KPI applications ..................................................... 177
Eclipse Theia ............................................................ 237 build ...................................................................... 322
SAP Conversational AI ................................... 479 analytical list page report ............................ 392
Embedded analytics ............................................. 165 MTAR file ............................................................. 323
skills ....................................................................... 478 APF application ................................................ 392
enabling applications ..................................... 178 Multidimensional reports ................................ 174
training data ...................................................... 478 business catalog ............................................... 393
tools ....................................................................... 168 create .................................................................... 396
Chrome debugger ................................................. 365 create .................................................................... 387
Embedded deployment ................................. 63, 67 data display ....................................................... 399
Classic home page layout .................................. 427 create view .......................................................... 392
Entity Data Model (EDM) ................................... 196 filters ..................................................................... 397
personalize .......................................................... 436 define KPI ............................................................ 388
Entity sets ................................................................. 188 SAP Design Studio grid reports .................. 399
Cloud connector ....................................................... 31 generic drilldown report ................................ 392
Entry page ................................................................ 413 Web Dynpro Grid ............................................. 399
Coherent UX .............................................................. 22 parameters ......................................................... 389
Extensions My Inbox app
Communication channels ................................... 82 report .................................................................... 391
Communication security .................................. 107 BAdIs ...................................................................... 361 semantics ............................................................ 389 configure ............................................................. 511
Component (component.js) ............................. 342 change business logic ..................................... 331 tile configuration ............................................. 391
CONF .......................................................................... 132 complex ................................................................ 331 visualize ............................................................... 390 N
Conversational UI ................................................. 475 deployment ......................................................... 335 KPI modeler ............................................................ 386
Conversational user experience ........................ 56 for end users ....................................................... 324 KPI tiles ........................................................... 113, 387 Native device capabilities ................................. 109
Core data services (CDS) ..................................... 171 groups of users .................................................. 328 Navigation ............................................................... 427
OData layer ......................................................... 363 Node.js ............................................................. 238, 555
CUST ........................................................................... 132 L
Custom analytical query .......................... 172, 550 UI layer ................................................................. 370 Northwind OData service ................................. 186
Custom business object ..................................... 548 Launchpad authorizations ................................ 117
Custom CDS view .................................................. 552 F Launchpad Content Manager .......................... 131 O
Custom logic ........................................................... 547 List-detail application (freestyle) .................... 340
Custom reusable elements ............................... 553 Floorplans ............................................. 259, 270, 339 application type ............................................... 343 Object page .................................................... 259, 270
Freestyle development ....................................... 339 column headings .............................................. 348 add columns ...................................................... 285
D Frontend implementation ................................ 118 column values ................................................... 349 add fields ............................................................. 285
Frontend roles ........................................................ 131 configuration ..................................................... 345 annotation file .................................................. 286
Data model data source and service ................................. 344 deleting ................................................................ 289
Detail.view.xml ................................................. 347
definition ............................................................. 196 G development ...................................................... 279
import ......................................................... 202–203 development ...................................................... 342 enhancements .................................................. 295
Data protection and privacy ............................ 109 Group ......................................................................... 114 header ................................................................... 350 entity selection ................................................. 282
Data provider class (DPC) .................................. 192 Groups and catalogs ............................................. 427 new project ......................................................... 343 guided development ....................................... 283
Data sources ............................................................ 272 Guided development ................................... 44, 255 preview ................................................................. 346 header .................................................................. 291
Date functions ....................................................... 401 project details .................................................... 346
new project ......................................................... 280
List report ....................................................... 259, 270
DDIC structure ....................................................... 205 I add columns ....................................................... 285
preview ................................................................ 286
Delightful UX ............................................................. 22 quick fix ............................................................... 292
add fields ............................................................. 285
Deployment ............................................................ 250 In-app extensibility OData ........................................................ 23, 122, 185
annotation file .................................................. 286
ABAP system ...................................................... 319 custom analytical query ................................ 550 authorizations .................................................. 117
development ...................................................... 279
extended application ...................................... 335 custom business object .................................. 548 create service ..................................................... 381
entity selection .................................................. 282
MTA ....................................................................... 321 custom logic ....................................................... 547 CRUD operations ............................................. 198
guided development ....................................... 283
prerequisites ....................................................... 318 custom reusable elements ............................ 553 new project ......................................................... 280 entity types ........................................................ 187
SAP BTP ................................................................ 321 UI adaptation ..................................................... 546 preview ................................................................. 286 extension ............................................................ 364

564 565
Index Index

OData (Cont.) S SAP Conversational AI (Cont.) SAP Fiori (Cont.)


from CDS .............................................................. 225 configuration ..................................................... 476 upgrade .................................................................. 93
from mapped data source ............................ 229 SAP’S UX strategy .................................................... 20 configure chatbot ............................................ 480 versions ................................................................... 23
generate from data source reference ....... 226 SAP API Business Hub ......................................... 277 debugger .............................................................. 498 workflows ........................................................... 503
implementation ................................................ 216 SAP BTP develop chatbot ................................................ 478 worklist application ....................................... 340
metadata ............................................................. 187 ABAP environment .......................................... 377 entity ..................................................................... 490 worklist template ............................................ 265
modeling .............................................................. 195 central launchpad .............................................. 69 expression analysis ......................................... 498 SAP Fiori Client ........................................ 31, 77, 107
Northwind ........................................................... 186 Cloud Foundry environment .............. 238, 250 expressions ......................................................... 482 SAP Fiori Cloud ......................................................... 31
queries .................................................................. 188 cockpit ......................................................... 272, 476 fetch entity values ........................................... 496 SAP Fiori elements ........................................ 50, 257
redefine ................................................................ 212 Identity Authentication Service intent ..................................................................... 482 advantages ........................................................ 269
register ................................................................. 221 authorizations .............................................. 241 messages ............................................................. 486 connect to OData ............................................ 275
service document ............................................. 187 Neo environment .............................................. 237 preview ....................................................... 488, 496 creating ............................................................... 269
standard services ............................................. 214 SDK for Android .................................................. 55 response display ............................................... 495 data sources ....................................................... 272
testing ................................................................... 223 SDK for iOS ............................................................ 54 roles and security ............................................. 476 deployment ........................................................ 316
V2 ............................................................................ 191 subaccount .......................................................... 239 SAP BTP ................................................................ 476 enhancements .................................................. 323
V4 ............................................................................ 191 trial ......................................................................... 239 SAP Fiori launchpad ........................................ 498 extensions ........................................................... 323
versions ................................................................ 191 SAP Business Application Studio .... 23, 43, 237, skill ......................................................................... 482 floorplans ............................................................ 270
Optional configuration ......................................... 93 280 training ................................................................ 496 metadata document ...................................... 276
Overview page .............................................. 259, 271 adaptation project ........................................... 371 triggers ................................................................. 484 SAP API Business Hub .................................... 277
add service .......................................................... 316 add source code ................................................. 245 SAP CoPilot ....................................................... 27, 500 SAP Cloud Application Programming
card ........................................................................ 312 authorizations ................................................... 240 capabilities ......................................................... 501 Model ............................................................... 278
development ...................................................... 309 capabilities .......................................................... 238 SAP Fiori ...................................................................... 19 SAP system ......................................................... 272
guided development ....................................... 311 command palette ............................................. 245 annotations ........................................................ 236 templates ............................................................ 270
preview ................................................................. 313 create project ..................................................... 243 application development .............................. 257 versus freestyle ................................................. 267
deployment ......................................................... 250 application enablement ................................ 111 SAP Fiori freestyle
P layout editor ....................................................... 246 application types ................................................. 32 data source ........................................................ 341
migrating to ....................................................... 253 apps reference library ................................ 37, 59 extension ............................................................ 361
Pages outline view ........................................................ 246 authorizations .................................................. 112 files created ........................................................ 341
personalize .......................................................... 437 problems view .................................................... 246 backend system ................................................... 25 OData extensions ............................................ 363
Personalizing apps ............................................... 163 quick fix ................................................................ 292 configuration ........................................................ 77 SAP S/4HANA extensions ............................. 361
Public key infrastructure (PKI) ........................ 103 SAP Fiori tools .................................................... 255 deployment ........................................................ 250 UI layer extension ........................................... 370
SAPUI5 controls ................................................. 247 deployment options ........................................... 63 SAP Fiori launchpad ..................... 23, 25, 143, 411
Q setup ...................................................................... 238 environment ......................................................... 59 ABAP setup ......................................................... 414
terminal ...................................................... 243, 245 foundation .......................................................... 417 app finder ........................................................... 438
Query Browser ....................................................... 170 testing ................................................................... 248 freestyle ................................................................ 339 authorizations .................................................. 117
wizard .................................................................... 243 frontend server ..................................................... 24 catalog object ................................................... 428
R workflow .............................................................. 517 initial setup ............................................................ 78 catalog to group assignment ..................... 430
SAP Business Suite .................................................. 63 installation ............................................................ 70 classic home page personalization .......... 436
Rapid content activation ................................... 156 SAP Business Technology Platform landscape ............................................................... 71 components ....................................................... 412
Rapid OData development ................................... 52 (SAP BTP) ................................................................ 23 list-detail application ..................................... 340 content ................................................................. 113
Representational state transfer (REST) ......... 185 SAP Business Workflow ...................................... 503 mobile ...................................................................... 53 content setup .................................................... 420
RFC .................................................................... 101, 219 SAP BW client .......................................................... 179 mobile security .................................................. 107 create tiles .......................................................... 428
authorizations .................................................. 154 SAP BW search ........................................................ 181 on-premise ............................................................. 63 custom icons ..................................................... 439
backend connectivity authorizations ...... 117 SAP Cloud Application Programming optional configuration ..................................... 93 customization ................................................... 163
Role-based UX ........................................................... 22 Model ................................................ 278, 377, 555 prerequisites .......................................................... 59 custom tile .......................................................... 440
Roles ........................................................................... 148 SAP Business Application Studio ................ 557 rapid activation ................................................ 156 elements ................................................................. 25
for catalogs ......................................................... 154 SAP Fiori elements ............................................ 557 SAP Fiori 3 .................................................... 23, 114 embedded deployment .................................. 415
Root view (app.view.xml) .................................. 342 SAP Cloud Identity Services .............................. 104 SAP Screen Personas ....................................... 449 end user customization ................................ 431
RSADMIN ................................................................. 179 SAP Conversational AI ................................. 56, 475 SAPUI5 application .......................................... 340 entites ................................................................... 420
Runtime adaptation ............................................ 163 API call .................................................................. 494 security ................................................................. 101 extensions ........................................................... 439
API service configuration .............................. 495 tools ....................................................................... 237 features ................................................................ 411
conditions ............................................................ 485 UI technologies .................................................... 50 footer .................................................................... 440

566 567
Index Index

SAP Fiori launchpad (Cont.) SAP Logon tickets .................................................. 105 SAPUI5 ....................................................................... 339 Service registration ............................................. 221
groups ................................................................... 430 SAP Mobile Platform .............................................. 53 adaptation project ............................................. 56 Shell ........................................................................... 412
home page layout ............................................ 422 SAP Mobile Server ................................................. 108 application ......................................................... 340 Simple UX ................................................................... 22
hub deployment ............................................... 418 SAP Mobile Services ..................................... 53, 108 extensions ........................................................... 370 Single sign-on (SSO) ............................................... 62
key user adaptation ........................................ 435 SAP NetWeaver AS ABAP system ...................... 25 floorplans ............................................................ 339 Software development kit (SDK) ....................... 53
navigation .......................................................... 427 SAP NetWeaver authorization concept ........ 112 SAPUI5 application (freestyle) Software Provisioning Manager (SWPM) ...... 72
page personalization ...................................... 437 SAP NetWeaver Security Guide ....................... 112 configuration ..................................................... 359 Software Update Manager (SUM) ..................... 72
pages ........................................................................ 30 SAP Portal ................................................................. 252 data source ......................................................... 358 Spaces and pages .................................................. 114
personalization ................................................. 431 SAP S/4HANA .................................................. 61, 250 development ...................................................... 357 add section ......................................................... 425
plug-ins ................................................................ 441 VDM ....................................................................... 167 preview ................................................................. 360 create page ......................................................... 423
rapid activation ................................................ 417 SAP S/4HANA embedded analytics ..... 165, 377 project details .................................................... 359 create space ....................................................... 424
roles ....................................................................... 443 SAP S/4HANA extensibility ............................... 545 SAPUI5 basic template ........................................ 267 enable ................................................................... 426
SAP GUI for HTML apps ................................. 143 SAP S/4HANA flexible workflow ..................... 503 SAPUI5 component .............................................. 118 space ID ............................................................... 425
scopes .................................................................... 421 activate ................................................................. 507 SAPUI5 controls ..................................................... 247 SPNEGO .................................................................... 102
sections ................................................................... 28 activities ............................................................... 506 SAPUI5 freestyle .................................................... 265 SSO ............................................................................. 101
security ................................................................. 443 agent rule mitigation ...................................... 506 data source ......................................................... 341 mechanism ......................................................... 106
semantic object ................................................. 427 agent rules ........................................................... 507 files created ........................................................ 341 Static tiles ................................................................ 138
setup ......................................................................... 92 conditions ............................................................ 507 floorplans ............................................................ 339 SUM ............................................................................... 94
shell header display ......................................... 439 configuration ..................................................... 508 SAP Fiori list-detail template ....................... 340
shell header title ............................................... 439 create ..................................................................... 504 SAP Fiori worklist template .......................... 340 T
spaces ............................................................. 30, 422 flexible block ....................................................... 505 SAPUI5 template ............................................... 340
target mapping ................................................. 429 Manage Workflows app ................................. 509 versus SAP Fiori elements ............................. 267 Target audience ........................................................ 15
task lists ..................................................... 415, 418 properties ............................................................. 505 SAPUI5 freestyle development ................ 50, 339 Target mappings ................................................... 114
tiles ............................................................................ 30 recipient ............................................................... 510 SAPUI5 Repository Upload and Download create .................................................................... 135
tile types ............................................................... 439 SAP S/4HANA Cloud ........................................ 509 Reports ................................................................. 319 Task lists ...................................................................... 78
Transaction PFCG ............................................ 443 save and activate .............................................. 511 SAP Web Dispatcher ................................ 25, 76, 84 Technical catalogs ................................................ 134
Transaction STC01 ........................................... 416 scenario ................................................................ 504 SAP Web IDE .................................................. 237, 527 Templates ............................................. 259, 270, 339
user action menu extension ........................ 441 scenario object ................................................... 504 annotations ........................................................ 534 Time characteristic–based hierarchies ........ 181
user settings extension .................................. 441 step conditions .................................................. 511 application development .............................. 532 Transaction /IWFND/MAINT
Web Dynpro apps ............................................. 143 steps ....................................................................... 510 architecture ........................................................ 527 _SERVICE .................................................... 124, 221
SAP Fiori Master-Detail template ................... 266 Transaction SPRO ............................................. 507 benefits ................................................................. 529 Transactional apps .................................................. 32
SAP Fiori search SAP S/4HANA flexible workflows deployment ........................................................ 541 Transaction PFCG ........................................ 112, 148
setup ......................................................................... 93 basic details ........................................................ 509 enhancements ................................................... 537 Transaction SAML2_IDP ....................................... 88
SAP Fiori tools ........................................................... 44 preconditions ..................................................... 510 migrating from ................................................. 253 Transaction SEGW ............................. 192, 194, 362
SAP Gateway ............................................. 63, 72, 186 SAP Screen Personas ............................................ 449 preview ................................................................. 540 Transaction SICF ................................................... 182
embedded ............................................................ 514 administration .................................................. 471 project ................................................................... 532 Transaction STC01 ...................................... 179, 416
SAP Gateway Client .................................... 125, 223 architecture ......................................................... 450 setup ...................................................................... 529 task lists .................................................................. 79
SAP Gateway server ................................................ 24 components ........................................................ 450 templates ............................................................. 533 Transport Layer Security (TLS) ........................ 103
SAP Gateway Service Builder ........................... 192 elements ............................................................... 456 SAP Workflow Management .................. 503, 514 Trusted communication ...................................... 88
association ......................................................... 197 flavor ..................................................................... 456 application development .............................. 516 Trusted connectivity authorizations ........... 117
association set ................................................... 197 flavor editor ........................................................ 457 create destination ............................................ 516
complex types .................................................... 198 floorplans ............................................................ 466 setup ...................................................................... 515 U
entity sets ............................................................ 197 letterbox ............................................................... 466 SAP Work Zone ...................................................... 252
entity types ......................................................... 196 navigation ........................................................... 451 SAP Work Zone for HR ........................................ 252 UI adaptation ......................................................... 546
function import ................................................ 198 SAP Fiori flavor .................................................. 465 Secure data storage .............................................. 108 UI enhancement ...................................................... 57
SAP Gateway service redefinition .................. 212 SAP GUI ................................................................. 451 Secure Sockets Layer (SSL) ................................. 103 Upgrades ..................................................................... 93
SAP GUI for HTML ................................................ 143 scripting ............................................................... 463 Security ..................................................................... 101 prerequisites ......................................................... 94
SAP HANA ................................................................ 556 theme ..................................................................... 460 Security Assertion Markup Language User actions menu ........................................ 27, 414
SAP HANA Cloud ................................................... 557 versus SAP Fiori ................................................. 455 (SAML) .................................................................. 104 User authentication ............................................ 101
SAP HANA native applications ........................ 238 Web GUI ............................................................... 453 Semantic object ..................................................... 137 User authentication and SSO ............................. 87
SAP Launchpad service ................................ 69, 252 SAP Smart Business ................................................ 34 Service implementation .................................... 216
site manager tools .............................................. 70 Service modeler .............................................. 44, 255

568 569
First-hand knowledge.

Souvik Roy is currently working as a senior application engineer at


Google. He has more than 17 years of experience in various tech-
nical areas in SAP. Before joining Google, he worked for Microsoft
and IBM. He has worked extensively on the design and development
of technical solutions on SAP S/4HANA, SAP BTP, SAPUI5, and SAP
Fiori. His areas of interest include AI and integration of SAP with ot-
her open-source technologies. Souvik can be found on LinkedIn at
https://www.linkedin.com/in/souvik-roy-b77396149.

Aleksandar Debelic is an SAP technical architect at IBM. He has more


than 17 years of SAP experience, primarily as a technical solution ar-
chitect and technology team lead. He is a managing consultant and
member of the Global SAP Center of Competence and a global de-
velopment team lead at SAP Innovation by IBM. His specialties inclu-
de the design and development of solutions that leverage the latest
technologies, such as blockchain, IoT, and machine learning. Aleks’s
current focus is building assets in the areas of SAP BTP extensions
and DevOps for SAP.

Gairik Acharya is a senior technical architect and associate partner


at IBM with more than 22 years of IT experience. He is a recognized
expert in ABAP, SAP HANA, OData, SAP Gateway, SAP S/4HANA, SAP
Fiori, SAPUI5, SAP BTP, and SAP Mobile Platform. In his role as a se-
nior architect at the IBM SAP S/4HANA Center of Excellence group
in North America, he has architected solutions for several global im-
plementations for IBM‘s top-tier clients.
He‘s a certified and recognized expert in SAP application consulting
and is responsible for building new capabilities within the group.
He‘s a frequent speaker at SAP TechEd, covering a variety of new technical areas. He is a
coauthor of ABAP in the Cloud: Development and Operations with SAP BTP, ABAP Environ-
ment and SAP Cloud Platform: Cloud-Native Development and the author of Developing
WRICEF Objects for SAP S/4HANA Cloud. Gairik can be found on Twitter @AcharyaGairik
and on LinkedIn at https://www.linkedin.com/in/gairik-acharya/.
Souvik Roy, Aleksandar Debelic, Gairik Acharya

SAP Fiori: Implementation and Development We hope you have enjoyed this reading sample. You may recommend or pass it
on to others, but only in its entirety, including all pages. This reading sample and
570 pages | 12/2022 | $89.95 | ISBN 978-1-4932-2204-9
all its parts are protected by copyright law. All usage and exploitation rights are
www.sap-press.com/5449 reserved by the author and the publisher.

You might also like