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

First-hand knowledge.

Browse the Book


In this chapter, you’ll establish a strong technical background with a
complete view of the machine learning and predictive analytics archi-
tecture in SAP S/4HANA. You’ll walk through the solution architecture for
all three implementation methods: embedded machine learning, si-
de-by-side machine learning, and side-by-side predictive analytics with
SAP Analytics Cloud.

“Architecture”

Contents

Index

The Authors

Siar Sarferaz, Raghu Banda


Implementing Machine Learning with SAP
S/4HANA
408 Pages, 2020, $89.95
ISBN 978-1-4932-2011-3

www.sap-press.com/5158
Chapter 4
Architecture
Before we dive into the implementation steps, it’s important to first get 4
a clear picture of the architecture of machine learning and predictive
analytics in SAP S/4HANA. We’ll walk through the architecture of the
various implementation models in this chapter.

In this chapter, we’ll dive into the architecture of SAP S/4HANA with machine learning
and predictive technologies. We’ll begin with a discussion of the technical challenges
involved with implementing machine learning and intelligent business processes.
We’ll then move on to an overview of the SAP S/4HANA solution architecture before
taking a closer look at the technical architecture for embedded machine learning, side-
by-side machine learning, and side-by-side predictive analytics. The objective is to pro-
vide you with the technical background for using the SAP S/4HANA delivered scenarios
and for implementing your own machine learning and predictive analytics use cases.

4.1 Introduction
In this section, we explain the challenges of applying machine learning in the context of
SAP S/4HANA. Solving those challenges is the added value that comes from the machine
learning approach provided with SAP S/4HANA. We also answer an important, often
asked question concerning what intelligence means within the scope of SAP S/4HANA.

4.1.1 Technical Challenges in SAP S/4HANA


Improved processing power, better algorithms, and the availability of big data are facil-
itating the implementation of machine learning for infusing intelligence into back-
office processes and providing an intelligent ERP system. With SAP S/4HANA, SAP
delivered the first intelligent ERP system on the market. SAP S/4HANA’s underlying
in-memory database SAP HANA increases speed, combines analytical and transac-
tional data, and brings innovation with embedded machine learning capabilities.
Thus, machine learning is natively integrated into SAP S/4HANA and can be easily used
across an entire organization to optimize business operations, improve employee job
satisfaction, and create better customer services. With SAP Conversational AI, a natural
language experience is provided by SAP S/4HANA, which revisits the way users interact
with the system due to enablement of hands-free applications.

83
4 Architecture 4.1 Introduction

However, incorporating machine learning capabilities into ERP solutions is a challeng- optimized resources consumption. Thus, the following equation applies: the higher the
ing task. This is due to the high complexity of such systems. SAP S/4HANA, for exam- level of automation of a business process or a system, the higher the level of intelli-
ple, consists of more than 250 million lines of code and 143,000 tables. It supports 25 gence is.
industry verticals, localizations for 64 countries, and thousands of business processes. In this section, we introduce a methodology for how to measure intelligence of busi-
Two substantial challenges must be solved: ness processes provided by SAP S/4HANA and describe both the business and technol- 4
1. How can we integrate machine learning systematically into business processes for ogy perspectives.
ease of consumption?
2. How can we make machine learning enterprise-ready? Methodology
SAP S/4HANA operates as a central system for an organization’s business processes.
Machine learning models have been created by data scientists for decades. However,
Key questions for defining automation levels center on understanding the common
often those models resided in special tools and were consumed by experts only, and so
structure of all those business processes. As illustrated in Figure 4.1, for a business pro-
they added hardly any value.
cess, there are four dimensions to be considered for automation. This is an industry
The best approach for solution architecture is to systematically build machine learning standard that’s transformed for ERP software.
into business processes so that intelligence is provided to the right person, in the right
place, and at the right time. In context of ERP systems, fused machine learning func-
Data acquisition
tionality must be enterprise-ready (which we’ll discuss at length in Chapter 5, Section automation level
5.5). This covers qualities like compliance, security, scalability, robustness, extensibil- 5
ity, configurability, operations, supportability, globalization or auditing. For example:
쐍 Training and inference processes of machine learning must consider the General 4
Data Protection Regulation (GDPR)
쐍 Machine learning models are new development artifacts that require a solution for 3
lifecycle management, starting from activation and moving through upgrades and
operations 2
Intelligence level of
쐍 Prediction power of machine learning models decreases with time; degradation
a business process

Information analysis
strategies must be devised 1

automation level

automation level
Action making
쐍 Reasoning behind inference results must be explained to end users and recorded for
legal auditing
5 4 3 2 1 1 2 3 4 5
In this chapter, we’ll focus on the solution architecture and conceptual foundations
that underly enterprise readiness. 1

2
4.1.2 How to Operationalize Intelligence

nd
Despite a long history of research and debate, there is still no common definition of 3

a
Exp
intelligence. Scientists have provided various models for mathematical, linguistic, tech-
nical, musical, and emotional intelligence, but none of them are generally accepted. But
4
how can we make SAP S/4HANA intelligent without knowing exactly what this means?
The operationalization method is applied to resolve this dilemma and make the term 5
intelligence measurable by defining different automation levels, like psychologists are Decision making
doing with IQ values. Intelligence in the context of SAP S/4HANA is not just an end in automation level
itself; rather, it’s about increasing automation toward an autonomous ERP system to
Figure 4.1 Methodology for Operationalizing Intelligence
reduce the total cost of ownership (TCO), such as through faster process runtimes or

84 85
4 Architecture 4.1 Introduction

Each dimension is rated from 1 (low) to 5 (high) for its level of automation. By determin- 4. System actively evaluates and recommends actions
ing the level of automation for each dimension for a given business process or a sys- 5. System autonomously perform actions that are traceable and auditable
tem, the overall level of automation can be detected. Thus, the current and target level
of intelligence can be determined, and an execution plan can be defined for making the To deepen your understanding, let’s apply this methodology to the following sales per-
business process more intelligent. formance use case: A sales plan is a strategy that sets out revenue goals and identifies
4
the steps to meet those targets. Developing such a sales plan is usually a manual process
Data acquisition is the process of inputting data into SAP S/4HANA using devices such
of analyzing historical data in order to forecast the revenue as a key figure. The situation
as a keyboard, scanner, disk, or voice. The following qualities could be used for deter-
could be improved by applying machine learning to predict the forecast in terms of how
mining the different automation levels for data acquisition: sales could develop in the future. Thus, the manual effort for sales planning can be
1. Manual entry by user decreased and the actual sales volume can be increased by providing better insights to
2. Manual entry and data integration take action where needed. Figure 4.2 depicts the application of the approach to deter-
mine the current and target levels of intelligence for the explained sales performance
3. Data integration and manual entry (exceptional)
scenario. As you can see, with predicting the sales revenue based on machine learning,
4. Conversational AI and data integration
the automation level of the dimensions decision and action making are increased. How-
5. AI-based data extraction and integration (e.g., PDF document is transformed to ever, the level of automation for the dimensions data acquisition and information anal-
structured data and entered by robotic bot) ysis remain unchanged because no additional intelligence is infused into them.

Information analysis is the process of studying and interpreting the data for meaning-
ful findings. The following qualities could be used for determining the different auto- Data acquisition
automation level
mation levels for information analysis:
5
1. Descriptive (what happened)
2. Diagnostic (why did it happened) 4

3. Predictive (what will happen)


3
4. Prescriptive (what should we do)
5. Cognitive (autonomous self-learning analysis of happenings)
2
Intelligence level of
Decision-making is the process of selecting a logical choice from the available options sales performance

Information analysis
by considering the impacts. The following qualities could be used for determining the (current) 1

automation level

automation level
Action making
different automation levels for decision-making:
1. User makes decisions manually 5 4 3 2 1 1 2 3 4 5
2. User consumes system events and changes for decisions
1
3. System provides relevant information to the user for making decisions
4. System actively evaluates and recommends decisions 2
5. System autonomously makes decisions that are traceable and auditable

Intelligence level of 3
Action execution is the process of enforcing instructions to achieve a specific goal. The
sales performance
following qualities could be used for determining the different automation levels for
(target) 4
action execution:
1. User performs actions manually 5
2. User consumes system events and changes for performing actions Decision making
automation level
3. System provides relevant information to the user for performing actions
Figure 4.2 Example of Applying Methodology

86 87
4 Architecture 4.1 Introduction

Business View 쐍 Deep learning for image recognition


Businesses of all sizes aim to increase their top line and bottom line by using a modern 쐍 SAP Conversational AI for natural language processing (NLP)
ERP system like SAP S/4HANA. Increasing levels of intelligence within business pro- 쐍 Bots or intelligent applications based on machine learning models for autono-
cesses support them in achieving these goals by generating new insights from data or mously making decisions and performing actions
by enabling data-driven automation. However, the individual business value of adding 4
intelligence is dependent upon the context or the use case in which it is used. For
Data acquisition
example, already an incremental improvement through rule-based approaches can be automation level
perceived as more intelligent compared to the status quo, thus adding more business 5
value. The proposed framework provides the foundation for an objective discussion
with various stakeholders about the current and future state of a business process and 4
the spectrum on which business value can be generated.

3
Technology View
To make a business process more intelligent, first the current level of automation
2
based on the described methodology should be determined. This is the foundation
from which the target level can be derived by solution managers based on business

Information analysis
automation level

automation level
needs. The next question is how to achieve the defined level of automation per dimen- 1

Action making
sion. There is not just one tool but various concepts and technologies to achieve the
specified intelligence level for the dedicated dimensions.
5 4 3 2 1 1 2 3 4 5
However, as shown in Figure 4.3, categorization of techniques can be provided for real- Manual
izing different levels: 1

쐍 Manual
2
쐍 Rule-based
Rule-based
쐍 Self-learning
3
Business processes can be run manually without any kind of automation. To overcome
this, various rule-based techniques can be applied to increase the level of automation 4
and intelligence. Let’s consider a few rule-based examples:
Self-learning
쐍 An ABAP report performing input or process validations and displaying error mes- 5
sages with resolution instructions to the user Decision making
automation level
쐍 A workflow for performing individual tasks/decisions moving from one step to the
next until a predefined process is complete Figure 4.3 Categories for Automation Technologies
쐍 An insight-to-action analytics scenario starting with a key performance indicator (KPI)
tile notifying the user about drifting trends, performing root-cause analysis and exe- In context of SAP S/4HANA, rule-based technologies are well known, so in this book
cuting corrective actions we’re focusing on self-learning methods based on machine learning and predictive
쐍 A situation-handling application informing the user about a problem, providing the analytics in order to increase the intelligence level of business processes.
necessary data for resolution, and recommending actions The described approach provides a framework to derive a strategic direction for SAP
S/4HANA in terms of making it more intelligent. To infuse SAP S/4HANA with more
When it comes to achieving level 5, rule-based approaches are no longer sufficient; they
intelligence, additional business processes must be moved to level 4 and 5, targeting an
must be extended to self-learning techniques. These techniques make sense of raw
autonomous ERP system. Thus, the overall intelligence of SAP S/4HANA is reflected by
data and discover hidden insights and relationships by learning from that data, rather
the level of the intelligence of the provided business processes.
than programming explicit rules. Some examples include the following:

88 89
4 Architecture 4.2 Architecture Overview

4.2 Architecture Overview met, whereas a partial match finds only some of the required parameters to fit. The
more parameters match, the better the quality of a match is. The following matching
In this section, we explain which machine learning application patterns have been types have been identified so far:
identified in the context of SAP S/4HANA. These are basically the underlying use cases
쐍 Relationship matching
that must be solved with the proposed architecture. We also describe the guiding prin-
Logically connects objects of different types—for example, matching multiple 4
ciples behind the solution architecture.
invoices to one payment
쐍 Compatibility matching
4.2.1 Machine Learning Application Patterns Fits objects of different types but with shared properties together to form a com-
For defining the solution architecture, it’s crucial to understand which technical capa- plete system—for example, assembly of a high/medium/low-end computer (a com-
bilities are required for the implementation of the machine learning scenarios. Thus, puter consists of several components, such as a motherboard, a CPU, memory, and a
the machine learning use cases were first analyzed concerning this matter. In this con- display, which have to fit together—and, for instance, the CPU fits only into mother-
text, several machine learning application patterns were identified, and those will be boards with a specific socket)
described in this section. The strategic direction is to provide for each pattern a uni- 쐍 Similarity matching
form concept and framework for implementation. Thus, the machine learning applica- Merges similar objects of the same type into one—for example, merging multiple
tion patterns can be applied as reusable building blocks by development teams to similar business partners because they’re the same type of object
accelerate the implementation of machine learning use cases.
For developing matching patterns, commonly used algorithms include multiclass clas-
sification algorithms like XGBoost/multilayer perceptron, clustering algorithms like K-
Matching
means, and nonparametric methods like the k-nearest neighbors algorithm.
Matching assigns relationships and detects similarities and anomalies in a given data-
set. As an example scenario, say that as a master data specialist, you want to reduce the
Recommendations
number of duplicates in the system during consolidation. While manual matching is
very time-consuming for users, intelligent systems can significantly speed up match- Recommendations propose datasets or actions based on the current context. For
ing decisions by using machine learning methods. The system can present one or more example, as a material requirements planner, you want to see potential solutions for
strategies and their quality to link similar objects. Users then only need to approve or resolving a material shortage issue. Intelligent systems can help users by recommend-
reject the suggestions or adjust them to their needs. Matching is needed when at least ing appropriate content or by suggesting an action or input the user may prefer. In this
two artifacts can be linked together due to a degree of similarity. case, we speak of a recommendation pattern and its impact on the UI. We differentiate
among three types of recommendations:
The process of matching follows a set of rules, which can be dynamically adjusted
(“learned”) by the system. The learned rules can change over time due to user input or 1. Content recommendations
other triggers. Matching can be applied on different content types, including the fol- The system filters the content down to what may be interesting for the user, based
lowing: on the user’s behavior or the content characteristics. Examples of typical content
recommender systems include Amazon and Netflix.
쐍 Text (e.g., search and replace) or images (e.g., find all dogs in a set of pictures)
2. Input assistance
쐍 Audio (e.g., natural language processing, when an audio stream is matched to a
The system assists the user by entering data or filtering data. Typical examples might
query)
be a search phrase suggestion, an appropriate form template, or a set of suggested
쐍 Video (e.g., find out which company logos appear and how often during a football
default values for certain fields, based on the user input and interaction history.
game)
3. Solution proposals
쐍 Complex business objects (e.g., matching of invoices to good receipts or finding a
The system supports users working on complex problems by recommending spe-
duplicate of a customer)
cific actions or proposed solutions. In some use cases, this might be combined with
The content to be matched highly influences the type of output and its presentation. a simulation of the possible outcome. Typically, solution proposals involve various
One aspect of matching is the quality of a match. This means that objects can fully or decision-support systems. Examples use cases include payment and invoice match-
only partially match together. A full match is given when all defined parameters are ing, and material shortage scenarios.

90 91
4 Architecture 4.2 Architecture Overview

As a prerequisite for the implementation of recommendation patterns, you must have systems based on predictive models significantly reduce the cost required for compa-
historical data concerning actions performed and inputs provided during business nies to forecast business outcomes, environmental factors, competitive intelligence,
processes. For the recommendation type solution proposal, the logging of business and market conditions.
processes is mandatory; for content recommendation, the necessary historical data There are two main classes of predictive models: parametric and nonparametric. The
might be derived from application data. For the recommendation type, input assis- features of these can be combined to form a third class, semiparametric models. Usu- 4
tance in addition to texts/descriptions could be required. ally, parametric models make specific assumptions with respect to one or more of the
For recommendation patterns, commonly used algorithms include social analysis, population parameters that characterize the underlying distribution. Nonparametric
multiclass classification algorithms like XGBoost/multilayer perceptron, text analysis/ models typically include fewer assumptions about structure and distributional
mining, or the recurrent neural network (RNN). arrangement but often encompass strong assumptions about independencies.
Some algorithms for predictive models include ordinary least squares, generalized lin-
Ranking ear models (GLM), logistic regression, random forests, decision trees, neural networks,
Ranking distinguishes between relevant and less relevant datasets of the same type in and multivariate adaptive regression splines (MARS). Each of those algorithms has a
relation to the current context. For example, as a purchaser, you want to see the top particular use and answers a specific question or uses a certain type of dataset.
suppliers for a specific product in the context of a given purchasing request. Ranking
simplifies complex decisions for business users by showing the best options first. Categorization
Items in a group are ranked by comparing criteria that are relevant for the user’s busi- Categorization assigns datasets to predefined groups (classes). For example, as a service
ness context, such as an amount, priority, or score. In a ranked table or list, the results agent, say you want to classify the priority of incoming requests (high/medium/low)
are always sorted to show the most highly ranked items on top. We differentiate based on their content to improve customer service. Categorization can also discover
between two types of ranking:
new groups (clusters) in the datasets, such as grouping customers into segments for
1. Ranking by inherent value appropriate product offerings, targeted marketing, or fraud detection.
Ranking is based on a value that is already available in the existing dataset, such as
Categorization is a complex task in which intelligent systems can help increase the
the price. The value is typically known and understood by the user and requires no
level of automation by applying machine learning methods of classification and clus-
further explanation.
tering. Those are used for the categorization of objects into one or more classes and
2. Ranking by score clusters based on their features. Classification and clustering are similar processes, but
Ranking is based on a calculated grade, mark, or score. In this case, users might need there is one minor difference. For classification, there are predefined labels assigned to
to understand the calculation behind the score, especially if machine learning meth- each input instance according to its properties; in clustering, those labels are missing.
ods are used. Because classification uses labels, training and testing datasets are required for verify-
ing models. This is not necessary for clustering. Usually classification is more complex
Although you can rank a list of items based on their rating, ranking and rating are two
different concepts. A rating places a single item on a predetermined scale—for exam- than clustering because there are many levels in classification, whereas only grouping
ple, rating your service provider on a scale from 1 (very bad) to 5 (very good). Ranking is is done in clustering.
always about comparing a common value across a group of items. In the UI, rankings For developing categorization patterns, commonly used algorithms include classifi-
are usually shown for a list or group. cation methods like XGBoost, neural networks like CNN/RNN/GAN, dimension-reduction
For developing relevance and ranking patterns, commonly used algorithms include clas- algorithms like principal component analysis, and clustering algorithms like K-means/
sification algorithms like XGBoost and clustering algorithms like K-means/the gaussian the gaussian mixture model.
mixture model, as well as nonparametric methods like k-nearest neighbors algorithm.
Conversational AI
Predictions Conversational AI interacts with a system based on natural language conversation and
Predictions forecast future data and trends based on patterns identified in past data, enables a hands-free paradigm. For example, as a purchaser, say you want to create a
taking into account all potentially relevant information. For example, imagine that as purchase order by talking with the system. Being able to have a conversation with a dig-
a master data manager, you want to estimate the potential number of change requests ital assistant to complete your business processes is a key part of the user experience
a team will need to process in the next quarter to balance the workload. Intelligent for an intelligent application.

92 93
4 Architecture 4.2 Architecture Overview

SAP Conversational AI understands typical natural language patterns to search for Let’s walk through these principles:
business entities using various parameters, look up a specific business entity by name 쐍 One model/uniform in cross
or ID, retrieve the value of an attribute of a specific business entity, and create simple Often the core data model is defined numerous times for different purposes only
new entities, including line items. SAP Conversational AI enables a humanized user
because minor metadata must be added. For example, technology solutions for inte-
experience for applications to get tasks done in the context of the business data. Thus, 4
gration, user interface (UI), analytics, or transactions unnecessarily require their own
interaction with applications in natural language is supported. Creation of business
specific business object models. This increases the total cost of development (TCD)
objects with information prepopulated from a conversational context is ensured. The
as the same content must be provided again and again. Due to incompatible meta-
SAP Conversational AI technology supports sharing of notes, screenshots, and business
models, cross topics like UI integration, extensibility, and authorization must be
objects with other users within the context of a conversation. The ability to synthesize
solved various times. This results in a high TCO and makes the consumption of solu-
business transactions from multiple SAP applications at a single point of interaction is
tions difficult for customers. Therefore, one core data model will be defined and be
enabled with this technology. Customer skills for using a digital assistant can be cre-
reused in different contexts by domain-specific enhancements.
ated and deployed across applications and channels.
The data model of SAP S/4HANA is based on core data services (CDS). Thus, redun-
dant data modeling is avoided and cross topics are solved uniformly. For machine
4.2.2 Guiding Principles for Solution Architecture learning, this data model will be reused as much as possible.
The defined solution architecture will follow the key guiding principles of SAP S/4HANA, 쐍 Multiple deployments
which we’ll describe in this section, as depicted in Figure 4.4. SAP S/4HANA supports multiple deployment options. Therefore, the defined solu-
tion must be invariant regarding different deployment options and work in on-
premise, privately managed, and public cloud environments. This must be ensured
also for machine learning applications.
Search, Exten- 쐍 Close to data
P
Planning, MDM UI sibility
mobile Integration In the context of machine learning, one golden rule is to bring the algorithms to the
data and not vice versa. Algorithms consist of minor lines of code and are usually
Analytic Authori- self-contained. In contrast, application data has high volume and holds numerous
Trans., … zation, …
dependencies. Thus, replication or extraction of application data is usually a very
complex and TCO-intensive task (e.g., handling of deltas, meeting performance re-
quirements, interpreting the data semantically) and should be avoided.

One model Uniform in cross


4.2.3 Solution Architecture
Improved processing power, better algorithms, and the availability of big data are facil-
itating the implementation of machine learning functionality in SAP S/4HANA. Fur-
On- Classi-
demand fication
thermore, SAP S/4HANA’s underlying in-memory platform, SAP HANA, increases speed,
On- Reg-
premise ression combines analytical and transactional data, and brings innovation with embedded
machine learning capabilities. With SAP Data Intelligence, additional features are inte-
Private Deep
mgmt. learning grated into SAP S/4HANA and the platform covers the entire spectrum, ranging from
simply consuming intelligent services to training and deploying its own machine
learning models.
Use cases like ranking, categorization, and prediction can be solved with classic algo-
Multiple deployment Close to data rithms like classification, clustering, regression, or time series analysis. Usually those
algorithms do not allocate much memory and CPU time. Thus, they can be imple-
Figure 4.4 Guiding Principles for Solution Architecture mented within the SAP S/4HANA stack, where the application data for model training

94 95
4 Architecture 4.3 Embedded Machine Learning

and the machine learning consuming business processes also are located. This embed- and predicting what’s likely to happen in the future. This ensures decision-makers have
ded machine learning architecture has very low TCO and TCD. As illustrated in Figure access to the right information at the right time to influence the best possible out-
4.5, the embedded machine learning architecture is based on the SAP HANA machine comes. The focus here is on smart predict, which is an explorative approach for unfore-
learning provided with the Predictive Analysis Library (PAL) and the Automated Predic- seen, exceptional, and irregular needs for machine learning methods.
tive Library (APL) as the necessary algorithms. A conversational UI for natural language interaction with SAP S/4HANA is enabled by 4
SAP Conversational AI. This is a self-learning solution using machine learning func-
Intelligent SAP Fiori/SAP Conversational AI/Explorational UI tionality to gain knowledge based on historic data and experience. Machine learning
requires additional visualization capabilities in the UI, such as for illustrating confi-
dence intervals or forecasting charts. Thus, to embed machine learning capabilities in
SAP S/4HANA SAP Cloud Platform UIs, intelligent SAP Fiori elements are used.
Machine In the following sections, we’ll provide more details about embedded machine learn-
learning service Application content: machine learning
Machine learning ing, side-by-side machine learning, and predictive analytics architecture. The focus
application consumption scenarios/pipelines
here is on the development architecture; the data science tasks are not within the scope
Data Deep of this book.
Pipeline Monitor/
science learning/
engine operate
Predictive tools GPU
Business logic
analytics
SAP Data Intelligence 4.3 Embedded Machine Learning
Embedded machine learning is an appropriate approach for use cases like ranking, cat-
SAP HANA Application content: models/stories
machine learning egorization, and prediction, in which classic algorithms such as classification, cluster-
ing, or regression are sufficient for the implementation. The SAP S/4HANA platform
Smart Smart Smart Search
predict insights discover insight contains with SAP HANA machine learning libraries that can be used for the develop-
Application Data integration
for model training
ment of embedded machine learning scenarios without the need to move application
data
SAP Analytics Cloud data. For a given key question to be solved with machine learning, data scientists per-
form experiments and explorations to determine the required algorithms and the data
Figure 4.5 Overall Solution Architecture attributes for model training. Those are the input for the development of the machine
learning use case that is the focus of this section.
Use cases like image recognition, sentiment analysis, and NLP require deep learning As illustrated in Figure 4.6, the solution is based on two main architecture decisions:
algorithms based on neuronal networks. For model training, usually these kinds of algo- using CDS views and making use of the machine learning techniques provided by SAP
rithms demand a huge volume of data and graphics processing unit (GPU) time. There- HANA.
fore, these kinds of scenarios are scaled out to SAP Data Intelligence to keep the load in
The data persistency in SAP S/4HANA is represented by application database tables. On
the transactional SAP S/4HANA system low. For this side-by-side machine learning
top of these tables, a virtual data model (VDM) is implemented using CDS views. One
approach, the requested data—images, audio, text documents, historical data, applica-
purpose of these VDM views is to hide the cryptic database model and to provide a
tion logs—are typically stored not in SAP S/4HANA but rather in the business data lake.
reusable semantic layer that can be consumed in different scenarios, such as analytics,
In general, the consumption of a trained model is based on remote interfaces. However,
planning, search, or transactions. At runtime, the CDS views are consumed via the ana-
for mass processing those interfaces must be bulk-enabled, or local deployment of infer-
lytical engine or the Service Adaptation Description Language (SADL), which is part of
ence models must be provided.
the ABAP application server. Those frameworks evaluate the metadata of the CDS views
Predictive analytics uses machine learning to automate data preparation, insight dis- in terms of annotations to enable the required functionality for the business process,
covery, and insight sharing for business users, operational workers, and data scientists. such as hierarchy handling or analytics capabilities. Out of the ABAP CDS views, the SAP
SAP Analytics Cloud provides predictive analytics features, also known as smart fea- HANA SQL views are generated so that SQL operations can be pushed down to SAP
tures. These features are dedicated to uncovering insights, understanding root causes, HANA for optimal performance.

96 97
4 Architecture 4.3 Embedded Machine Learning

The algorithms for embedded machine learning can be performance-intensive as is to provide a common interface for the consumption of machine learning models inde-
high volumes of application data must be processed. Thus, for performance optimi- pendent of the underlying predictive engine. The intention is to harmonize the manage-
zation, the algorithms should be processed close to the application data. SAP HANA ment of machine learning models and to provide a simple common interface to allow
provides PAL and APL to offer statistical and data mining algorithms. In addition, applications to interact with different types of supported machine learning libraries
specific algorithms can be implemented if required. As shown in Figure 4.6, those algo- without the requirement for applications to develop machine learning engine-specific 4
rithms are invoked and orchestrated by the modeling and administration component, code. Consumer applications interface only with application programming interfaces
which is explained later in this section. (APIs) and do not interact with low-level machine learning libraries.
The ISLM architecture is shown in Figure 4.7. The ISLM framework contains information
Built-in Explorative about the installed SAP HANA libraries. It provides a repository for machine learning
consumer consumer
models that includes, for example, information concerning model types (e.g., regres-
OData InA, MDX
sion, classification, time-series), model data sources (e.g., tables, views), model training
data, and model quality figures to allow for assessing metrics and supporting model
SAP S/4HANA
comparison. The ISLM framework also provides a pluggable infrastructure and adapters

Machine learning
Analytical engine/SADL for APL and PAL. In addition to hiding the complexity of machine learning libraries

services
Training and
from application development, the ISLM framework supports the lifecycle manage-
monitoring
CDS view/AMDP class ment of the involved artifacts in terms of transport within the system landscape, deliv-
CDS view
for machine learning ery, and upgrade mechanisms. Furthermore, it provides configuration capabilities for
model training based on the customer data in their development landscape. This frame-
work is going to be explained in detail in Chapter 5.

Modeling and
SAP HANA machine administration
SQL view
learning library: PAL/APL

Application Machine learning


table model SAP HANA API
(SQLScript procedure/scripted calculation view)

SAP HANA

Figure 4.6 Embedded Machine Learning Architecture ISLM engine adapter ISLM repository

The algorithms require application data as input for model training. The VDM, with its
SQL views and the application tables, can be reused for this purpose. However, in con-
APL Other
trast to the ABAP CDS views, not all metadata is available. This drawback can be elimi- Machine learning
embedded embedded
model
nated once the ABAP CDS views can be transformed to SAP HANA CDS views. The engines engines
trained models are exposed to business processes by wrapping them with CDS views.
SAP HANA
The details of this integration are described in the next section. The CDS views for
machine learning can be combined with other VDM CDS views and can then be exposed Figure 4.7 ISLM Architecture
to the consumers. By consuming machine learning models through CDS views, existing
content (e.g., VDM views) and concepts (e.g., authorization, extensibility, UI integration) Machine learning models are stored in SAP HANA and exposed by generated SQL script
are reused. This results in a simple and very powerful solution architecture. procedures or scripted calculation views. But how are those SAP HANA entities con-
The modeling and administration tool illustrated in Figure 4.6 was previously known as sumed from the ABAP application server?
the Predictive Analytics integrator (PAi). As of the 2020 SAP S/4HANA release, it is re- Various techniques are provided by the ABAP application server to access the underly-
branded as the intelligent scenario lifecycle management (ISLM) framework. Its purpose ing database system. As already mentioned, existing content and concepts are reused

98 99
4 Architecture 4.3 Embedded Machine Learning

wherever possible. Therefore, CDS views and CDS table functions are the appropriate APL has built-in data science steps like feature engineering and detection of adequate
technologies to consume the machine learning models stored in SAP HANA, as shown algorithms. Therefore, this library is very easy to use und results in very low TCO and
in Figure 4.8. SQL script procedures are used to wrap the machine learning models on TCD. However, the algorithms are restricted to classification/regression, clustering,
the SAP HANA level. Those SQL script procedures can’t be invoked by standard CDS time series analysis, and recommendation models. Thus, for breakout scenarios in
technology but can be with CDS table functions. These are used for breakout scenarios. terms of using other algorithms or fine-tuning the models, PAL is used; it provides 4
They are data dictionary objects and are defined via data definition language (DDL) more than 100 machine learning algorithms. Figure 4.9 illustrates how this library is
sources, but in contrast to CDS views, they are not database-independent; they repre- integrated for embedded machine learning.
sent native SQL script functions. These functions are implemented using the tech-
niques of ABAP Managed Database Procedures (AMDP)—that is, via ABAP with an SAP S/4HANA
implementation in SQL script. On top of the machine learning models exposed via SQL
Read Consume
script procedures, corresponding CDS views for machine learning are defined by using Input CDS Machine learning Machine learning
CDS table function technology. The CDS table function represents the input and output view logic AMDP class application
structure of the SQL script procedure that is called by the AMDP implementation of the Copy Train
CDS table function. The provided CDS view, and respective CDS table function, can be
Template Training app
combined with other VDM views and consumed accordingly. For this purpose, OData AMDP class
services can be generated automatically. Existing CDS annotations can be used.

SAP S/4HANA
Application Machine learning
PAL library
data model

CDS table SAP HANA


CDS view
function
Figure 4.9 PAL Integration

For development efficiency, for each PAL algorithm, a template in the form of an AMDP
ABAP class
class is provided. This class implements predefined interfaces and offers standardized
methods for training and consumption of models. For extensibility, business add-in
(BAdI) enhancement points are provided for those methods. Application developers
copy and adopt those templates for specific machine learning scenarios. CDS views as
inputs for model training are defined. Consumption and integration of the machine
learning models into the business processes is based on the method of the AMDP class.
SQL script
procedure Concrete machine learning model instances are available once the customer triggers
training via the training application.
The following qualities are provided by this solution architecture using PAL:
ISLM: repository, engine 쐍 Seamless integration into the SAP S/4HANA programming model
SQL view
adapter and API
쐍 Reuse of existing SAP S/4HANA concepts (e.g., authorization, UI integration), CDS
view content, and tools
쐍 Powerful extensibility based on enhancement points and BAdIs from start due to
Machine learning
Application table model reuse of the transactional programming model
쐍 Rich set of PAL algorithms and usage of SAP HANA text analysis
SAP HANA
쐍 Supports breakouts per definition, such as orchestration of multiple algorithms or
Figure 4.8 ABAP Integration data transformations

100 101
4 Architecture 4.4 Side-by-Side Machine Learning

쐍 Lifecycle management and operations with SAP S/4HANA ABAP tools and concepts can be used to innovate critical business processes, which will then produce even more
쐍 GDPR compliance by design; no data transfer fine-grained contextualized data, feeding a virtuous cycle. Embedded machine learn-
ing targets scenarios in which the business and machine learning logic reside in the
쐍 On-premise and cloud deployment ensured due to one-code-line approach
SAP S/4HANA platform, but the term side-by-side machine learning is used in the fol-
Lifecycle management and ABAP integration of PAL models are also based on intelli- lowing use cases: 4
gent scenarios, as depicted in Figure 4.10. The details of lifecycle management will be
쐍 SAP S/4HANA machine learning based on SAP Cloud Platform
described in Chapter 5, Section 5.5.1.
The SAP S/4HANA application and the according business logic are based on SAP
Cloud Platform. Such applications should consume the required machine learning
SAP S/4HANA services directly from SAP Data Intelligence and SAP HANA machine learning, fol-
lowing the rule of bringing the algorithms to the data.
Consume 쐍 SAP S/4HANA machine learning based on ABAP application server
Machine learning
Intelligent scenario The SAP S/4HANA applications and the related business logic are based on the SAP
application
Register S/4HANA platform. However, the required machine learning capabilities are not
Consume available on SAP S/4HANA—for example, image and language recognition, or senti-
Train ment analysis. These features are consumed from SAP Data Intelligence remotely or
Machine learning based on an exchange of trained models.
Training app
logic AMDP class
Side-by-side machine learning fits use cases like image recognition, sentiment analysis,
or NLP that require deep learning algorithms based on neural networks. These kinds of
algorithms are very demanding regarding consumption of system resources. They usu-
Trained model PAL library ally require huge volumes of data and GPU time for model training. Thus, to keep the
load in the transactional SAP S/4HANA system low and ensure acceptable runtime for
the business processes, side-by-side machine learning scenarios are scaled out to SAP
Figure 4.10 PAL Model Training Data Intelligence. This infrastructure also complements the overall solution in which
specific algorithms are not provided on the SAP S/4HANA platform, classic methods
As already mentioned, PAL algorithms are integrated via AMDP technology from SAP (e.g., regression, classification) consume too many resources of the transactional sys-
HANA into ABAP. The AMDP class implements an interface with methods for training tem, or huge volumes of external data (e.g., Facebook, Twitter) are required for model
and consumption. The intelligent scenario is created for the PAL-based use cases, too. training. In particular, SAP S/4HANA extension applications should consume SAP Data
An intelligent scenario is a business application-specific machine learning design time Intelligence capabilities because the application data and business processes are founded
artifact that includes metadata about an application data source for training (e.g., table on SAP Cloud Platform. Thus, the golden rule of bringing the algorithms to the data is
or view), an algorithm type (e.g., regression or classification), and a consumption API. followed.
The AMDP class for the PAL algorithms is registered in an intelligent scenario. Because
So because side-by-side machine learning scenarios are based on SAP Data Intelligence,
the generic training application is based on intelligent scenarios, it triggers the training
the question arises: How do we integrate this technology into SAP S/4HANA in terms of
method of the AMDP class and saves the trained model. Machine learning applications
model training and inference? The answer to this question is given next.
can consume the trained model via the AMDP class.
SAP Data Intelligence is an important component of the side-by-side machine learning
architecture. It’s designed for the cloud and deployable in any cloud, hybrid, or on-
premise landscape that addresses the entire end-to-end lifecycle for creating value out
4.4 Side-by-Side Machine Learning
of data, combining enterprise AI with intelligent information management, and
The journey toward the intelligent enterprise is enabled by the interaction among enabling enterprises to effectively operationalize machine learning and data science
three main pillars: data, intelligent algorithms, and business processes. Nowadays, en- on complex and real enterprise landscapes. We introduced SAP Data Intelligence in
terprises have big and diverse enough data assets to feed intelligent algorithms, which Chapter 3, Section 3.3.1.

102 103
4 Architecture 4.4 Side-by-Side Machine Learning

SAP Data Intelligence handles how customers discover, refine, govern, orchestrate, and 쐍 Native integration capabilities
scale efforts in getting intelligence out of data assets they own or those to which they Besides reusing all relevant open-source technologies and open standards, SAP Data
need to connect. This covers all the data management use cases that deal with different Intelligence is also capable of natively integrating and reusing SAP data sources and
kinds of data (structured, unstructured, streaming), different integration approaches engines. SAP Data Intelligence pipelines can natively integrate into ABAP applica-
(batch, real-time, near-real-time), or different processing patterns (offline, online, lamb- tions; orchestrate SAP Business Warehouse (SAP BW) process chains, SAP Data 4
da). Key capabilities include the following: Services jobs, and SAP HANA flowgraphs; execute SAP HANA streaming analytics
쐍 Data connectivity and orchestration scenarios; and integrate into all SAP Cloud Platform applications.
Leverage central connection management to connect to data wherever it resides— Many of these capabilities may exist today in a customer’s information management
on premise or in the cloud—regardless of the data type—structured, unstructured, landscape, but they are typically offered in a myriad of different ways across several
streaming—and integrate it with flexible data pipelines. Orchestrate data process- disparate toolsets that require different skills and different frameworks, whereas SAP
ing across highly distributed and heterogeneous landscapes, executing any SAP or Data Intelligence provides a single, comprehensive way to manage all data types cohe-
non-SAP processing engines close to the data sources to minimize the amount of sively and intelligently.
data to be moved or replicated.
SAP Data Intelligence is designed to be used by different user profiles throughout the
쐍 Data governance and cataloging
enterprise. From a business user with technical affinity to developers and data scien-
Access an advanced metadata management system/catalog, enabling data lineage,
tists, there are modules, services, and tools for all levels. The typical lifecycle SAP Data
data quality, profiling, data discovery, and searching of datasets to ensure auditabil-
Intelligence supports comprises the following phases:
ity and governance. This gives IT team members the flexibility and control they
require to ensure trusted and accurate data is easily discoverable by the teams that 1. Data management
need it, all integrated within a single solution. With a comprehensive set of intelligent information management capabilities, it’s
possible to manage the data that drives the entire AI process, making it possible for IT
쐍 End-to-end lifecycle management of machine learning models
enterprise architects, data engineers, and data management professionals to elimi-
Streamline data science and machine learning projects, from modeling and develop-
nate data silos and ensure that the data needed for data science teams is made avail-
ment to operations, across all enterprise data assets to manage the end-to-end life-
able in a governed manner. With tools to help profile, prepare, and merge data, data
cycle. A central repository enables versioning and a tailored lifecycle management
science teams can rapidly get to the datasets they need to move on to the next phase.
process for machine learning projects.
2. Experimentation
Support data discovery, access and preparation, and experimentation in Jupyter
For data scientists developing models, SAP Data Intelligence provides the tools they
Notebook; leverage a library of pretrained models for the most common functional
are experienced with, like Jupyter Notebook, and the frameworks they require, like
services; and support deployment, (re)training, serving, and monitoring of all mod-
R, Python, or TensorFlow. Once provisioned, data science teams can work in a Jupy-
els. Access ready-to use, adaptable business content in terms of operators and tem-
ter Notebook environment to develop models using open-source frameworks and
plates. Finally, SAP Data Intelligence provides an environment for model deploy-
SAP frameworks (like APL and PAL), pretrained services, and a visual pipeline GUI to
ment and operation, a means to integrate results back into an application or employ
delayed consumption, and continuous testing and maintenance of all models in orchestrate data ingestion, training steps, or multiple models. These experiments
production. for a specific business problem are put under version control so teams can explore
various potential solutions and models and easily test and iterate until they land on
쐍 One integrated solution
a model they would like to pursue in production.
SAP Data Intelligence includes data pipelining, orchestration, machine learning, and
metadata cataloging in a single solution. This is very valuable: all hyperscalers have 3. Productization
different services for these functionalities, which have to be integrated, while the Models can rapidly be delivered into production by packaging the required assets
main pure players and niche players focus only on a subset of these areas. (like pipelines and model assets) into a machine learning scenario. In production, a
team responsible for machine learning operations can easily take over and connect
쐍 Hybrid and multicloud deployment
production data to the new scenario, (re)train, deploy models to model servers, inte-
SAP Data Intelligence is available both as a service in SAP Cloud Platform and as a
grate with business applications, and start generating insights. Once in production,
bring-your-own-license product. It has been natively built on Kubernetes since its
models can be centrally managed from a single cockpit in which the ongoing testing,
initial design, allowing it to deploy the very same solution in any hyperscaler, pri-
retraining, and quality of those models can be monitored.
vate cloud, or on-premise data center.

104 105
4 Architecture 4.4 Side-by-Side Machine Learning

Models and pipelines can be reused, recombined, and traced through the entire process open to third-party frameworks a data scientist would like to work with. There is also
and to jumpstart new scenarios. This includes reuse of datasets as well. The machine specific support for SAP HANA-embedded machine learning; that is, a connection to any
learning functionality of SAP Data Intelligence is used directly by data scientists SAP HANA, PAL, or APL data stored in SAP HANA can be used from an SAP Data Intelli-
through a set of tools run as web applications either inside SAP Data Intelligence or gence context.
indirectly by applications that call representational state transfer (REST) APIs of SAP The pipeline engine orchestrates complex data flow pipelines, is based on scalable 4
Data Intelligence. Both tools and backends providing REST APIs are based on the sys- infrastructure provided by SAP Cloud Platform/Kubernetes, supports heterogenous
tem application server, which helps to delegate aspects like user authentication and execution runtimes (e.g., R, Python, Spark machine learning), and enables connectivity
authorization to the platform. Tools include design-time tools for data scientists, like
to SAP S/4HANA. Based on the application data, exploration and feature engineering is
the open-source JupyterLab component and the SAP Data Intelligence pipeline mod-
performed by data scientists to define machine learning models. For this, common
eler. Moreover, there are tools for managing the lifecycle of a machine learning project
data science tools like Jupyter Notebook and Python are supported. For deep learning
and the lifecycle of datasets used in a machine learning context.
scenarios, a framework is provided that enables training on a GPU infrastructure.
As illustrated in Figure 4.11, SAP Data Intelligence provides a data lake for business data.
To implement machine learning use cases, applications must define machine learning
Thus, application data can be extracted from SAP S/4HANA for training machine learn-
scenarios and model pipelines. SAP Data Intelligence organizes each machine learning
ing models.
use case by the artifact machine learning scenario. This bundles all design-time entities
Intelligent SAP Fiori/ SAP S/4HANA machine to solve a machine learning business question. In addition, it is the bracket keeping
SAP Conversational AI learning app track of consumed and produced artifacts, like datasets and machine learning models,
Machine learning as well as the metrics reported by these, and is thus the basis for machine learning sce-
service consumption nario lifecycle management. Thus, the machine learning scenario artifact contains all
SAP S/4HANA SAP Data Intelligence development entities that are required for the implementation of a specific machine
Machine learning
service consumption learning use case.
Machine learning
application Application content: machine learning scenarios/pipelines Inference and training processes are developed as pipelines comprising sequential and
parallel tasks. In particular, for each machine learning scenario, a training pipeline is
Data Deep
provided, which receives the training data from SAP S/4HANA and processes the data
SAP HANA Pipeline Monitor/
machine learning engine
science learning/
operate
to train the algorithms for a specific use case. Structured data is handled by a CDS oper-
tools GPU
ator and stored, such as in SAP HANA, whereas unstructured data is managed by an
object store and big data storage. Often, saved application data is deleted after a train-
Application
data Business data lake ing run. However, there are use cases with high retraining frequency, in which, after an
Data integration
for model training initial upload, the deltas periodically must be received and stored for the next training
run. The application data can be persisted. Alternatively, streaming based on continu-
Figure 4.11 Side-by-Side Machine Learning Architecture ous data transfer without persistency can be applied. The training and inference pipe-
lines are exposed by REST services. Those are invoked by SAP S/4HANA applications
For pre- and postprocessing of the application data, the pipeline engine offers a graph- remotely and integrated into the business processes and UIs. Thus, machine learning
ical programming model to create pipelines. A pipeline orchestrates data ingestion, capabilities are provided as built-in functionality to the right person, in the right place,
training, and inference activities. It consists of operators and data flows connecting and at the right time.
those operators. Operators can be predefined connectors to integrate into data sources
The operation and monitoring of machine learning models are managed with different
leveraging proven SAP technologies from SAP Data Services, SAP HANA smart data inte-
administration applications:
gration, SAP Landscape Transformation Replication Server (via an ABAP agent), freely
programmable options (like a Python operator), or serving operators for exposing a 쐍 The machine learning operations cockpit provides a view of currently deployed
REST endpoint. For machine learning cases, SAP Data Intelligence provides specific ma- models and their runtime KPIs and produced artifacts. It allows for manual activa-
chine learning operators that call functional services (like for image classification) or tion of machine learning scenarios and calling the associated pipelines. It also sup-
core services (for model serving and training) provided by SAP Data Intelligence or by ports landscape management, model configuration, and provisioning of machine
hyperscaler services. With the operator concept, SAP Data Intelligence is completely learning scenarios to other tenants.

106 107
4 Architecture 4.4 Side-by-Side Machine Learning

쐍 Scenario scheduling allows automated calls to the pipeline API.


쐍 The debrief cockpit provides data scientists with KPIs for the created inference pipe- <<interface>>
IF_ISLM_INTELLIGENT_SCENARIO
lines/models during the exploration and retraining phases.
+ GET_SCENARIO_GUID : GUID
Figure 4.12 drills into the details of the integration between SAP Data Intelligence and … 4
SAP S/4HANA. On the SAP S/4HANA side, an intelligent scenario is the artifact corre-
sponding to the machine learning scenario on the SAP Data Intelligence side. An intel-
Implement
ligent scenario is also a design-time artifact that represents a machine learning use case scenario marker
<<interface>>
and contains metadata like the name and description of the use case. In particular, it IF_ISLM_PREREQUISTE_CHECK
Implement
encompasses the ABAP class, which implements the consumption API of the machine CL_ML_LOGIC checks
+ GET_CHECKS_METADATA
learning model. + GET_CHECKS_PARAMETERS : PARAMETERS
+ CONSUME_INFERENCE ( ) + PERFORM_CHECKS : RESULT
SAP S/4HANA SAP Data Intelligence Handle inference …
Consume Get inference
R R
Machine request
learning scenario client
Machine learning Machine learning
application logic ABAP class
Consume
Training Trained Inference
R CL_ISLM_INFERENCE_CLIENT
pipeline model pipeline CL_ISLM_INFERENCE_PROVIDER
Application data CDS extractor
Extract + ADD_REQUEST_BODY (STRING)
Register
+ GET_INFERENCE_CLIENT:
data Operators + ADD_REQUEST_HEADER (HEADER_TABLE)
R IF_ISLM_INFERENCE_HTTP_CLIENT
+ SEND_AND_RECEIVE () : RESPONSE_DATA
Intelligent
scenario ISLM framework + CL_LMFRW_INFERENCE_PROVIDER (
R Machine IF_ISLM_INTELLIGENT_SCENARIO) …
Train, deploy, learning library
monitor
Figure 4.13 Design of ABAP Machine Learning Logic Class
Figure 4.12 SAP Data Intelligence Integration into ABAP

As described, the machine learning logic ABAP class is registered to an intelligent sce-
As already mentioned, in SAP Data Intelligence, a pipeline for model training and con-
sumption is provided for each machine learning use case. The training pipeline reads nario on the SAP S/4HANA side. To have a harmonized programming model across all
the necessary application data based on the CDS extraction view, which is provided by machine learning use cases, the ABAP class is standardized by implementing inter-
the SAP S/4HANA application. The pipelines are exposed via REST services and can be faces. Side-by-side machine learning scenarios have to register the machine learning
invoked from SAP S/4HANA. The training REST service has a standardized signature logic ABAP class in the ISLM framework via an intelligent scenario. During develop-
and can be called generically the ISLM framework. This component is in charge of the ment, changes to the intelligent scenario are expected. Therefore, the artifact is saved
lifecycle management of the machine learning models and provides capabilities like as a draft initially. The draft status controls the transportation of the scenario registra-
scheduling of training jobs or monitoring. The signature of the REST services for model tion content in the ISLM framework.
consumption is scenario-specific (e.g., forecast revenue for sales orders or predicting Once the intelligent scenario is finalized, it has to be published. The intelligent scenar-
debt default risk) and is handled by the machine learning logic ABAP class shown in Fig- ios need to implement the IF_ISLM_INTELLIGENT_SCENARIO marker interface to be identi-
ure 4.12. This ABAP class basically wraps the REST service into an ABAP API that can be fied as an intelligent scenario in the ISLM framework. This is a mandatory procedure for
consumed by machine learning applications in order to integrate inference results into side-by-side machine learning scenarios for implementation of the GET_SCENARIO_GUID
business processes and UIs. Optionally, inference results can be cached for scenarios in method. This method returns the corresponding machine learning scenario of SAP
which performance optimization is required. Data Intelligence. Thus, the development artifacts between SAP S/4HANA and SAP Data
Figure 4.13 illustrates the details of the integration with a machine learning logic class Intelligence are connected. The IF_ISLM_INTELLIGENT_SCENARIO interface defines the re-
CL_ML_LOGIC. quired behaviors of an intelligent scenario in the ISLM framework. This enables the
operational part of the intelligent scenario to be more concrete and stable. This imple-
mentation will be validated during the registration process.

108 109
4 Architecture 4.4 Side-by-Side Machine Learning

The CONSUME_INFERENCE method wraps the REST service for model consumption as an reusing the CL_ISLM_INFERENCE_PROVIDER machine learning utility class. Based on the
ABAP API that is exposed to machine learning applications. The input consists of one or URL, a REST client object is created in ABAP. This proxy object is used to call the REST
more records for which inference results are provided based on the underlying service for inference. The input parameters for the inference call are passed by the
machine learning model. machine learning application. The calculated results are also processed by the machine
It is difficult for customers to understand which technical and business prerequisites learning application—for example, integrated into business processes or illustrated in 4
are required to train and consume machine learning scenarios. For example, sufficient the UI.
data volume must be in place for training of machine learning algorithms. Also, under-
lying business processes must be activated and configured in order to have a meaning-
CL machine CL machine SAP Data
ful foundation for the training process. With an increasing number of machine ISLM framework
learning logic learning utility Intelligence
learning scenarios, such evaluation can no longer be performed by the customers man-
ually due to high TCO and huge complexity. Therefore, a prerequisite check capability
is required to automatically validate for each machine learning scenario whether the Get_Scenario_ID
necessary prerequisites for training and consumption are met. Intelligent scenarios
provide the necessary prerequisite checks by implementing the IF_ISLM_PREREQUISITE_ Scenario_ID
CHECK interface. Thus, the readiness and consistency of the machine learning use case
Get_Endpoint (Scenario_ID, Training)
can be checked, such as whether enough data is available for model training. Those Get_Endpoint
checks are performed by the ISLM framework to evaluate whether the prerequisites for
model training are fulfilled. Training_URL
Training_URL
To enable the ABAP class for customer extension, enhancement spots are provided.
Thus, customers can enhance the consumption logic or add specific transformations as
Create_REST_Client (Training_URL)
examples. Reusable routines are provided by the CL_ISLM_INFERENCE_PROVIDER and CL_
ISLM_INFERENCE_CLIENT utility ABAP classes. These classes support methods like getting
REST_Client
the currently activated model for inference, receiving the URL endpoint of a REST ser-
vice provided by SAP Data Intelligence, creating an ABAP REST client object based on REST_Client.Train
the REST service URL, triggering training for a machine learning scenario, or reading
monitoring data for a trained model. The interactions among those classes in the con- Model_Version
text of training and inference processes are shown in Figure 4.14.
The training process is triggered by the ISLM framework for a selected intelligent sce-
nario. Because an ABAP class is registered for each intelligent scenario, the ABAP imple-
mentation for the selected intelligent scenario can be determined. Thus, the corre-
sponding machine learning scenario on the SAP Data Intelligence side can be read.
With the ID of the machine learning scenario, the URL for the training REST service can
be determined by invoking the necessary reuse routine of the machine learning utility Figure 4.14 Training Sequence
class. Once the URL for the training REST service is available, an ABAP REST client object
can be created based on the URL. This proxy object is used to call the training method The REST inference call is handled by the CL_ISLM_INFERENCE_CLIENT machine learning
from ABAP and run the necessary job. The status of the training—whether the job was utility class. As a first step, an HTTP client is created based on the URL of the REST ser-
successful or failed—is displayed by the ISLM framework for the end user. vice. This proxy object is used to send the request and receive the according response.
The inference process is usually triggered by the machine learning application, as The request message must be compiled by setting header and body attributes. The
shown in Figure 4.15. The API for the inference calls is provided by the machine learning response message must be transformed into ABAP structures for consumption by
logic ABAP class, which is known for the machine learning application during design business processes.
time. Like the training process, the URL for the inference REST service is determined by

110 111
4 Architecture 4.4 Side-by-Side Machine Learning

methods. Figure 4.16 illustrates the basic steps for the training and inference pipelines,
which can vary per use case.
Machine learning CL machine CL machine SAP Data
application learning logic learning utility Intelligence

Training Inference
Consume (Input) 4
Get_Endpoint
Get_Endpoint
(Scenario_ID, Inference)

Inference_URL Read
Inference_URL training data
(CDS extractor)
Create_REST_Client (Inference_URL)
Read Create
REST_Client Apply training model REST listener
data filter
REST_Client.Consume (Input) (optional)

Result

Result Transform
training data

Save Apply
Figure 4.15 Inference Sequence inference
training data
(optional) request
Now that we’ve introduced the basic structure of the REST client, the question of how
to manage dynamic changes to the REST endpoints can be addressed. Machine learning
Train Provide
models must be retrained regularly to learn from changes to the data environment. inference
algorithm
Each retraining results in a new machine learning model version with a new REST ser- metrics

vice for inference. However, consuming machine learning applications usually breaks
if the underlying inference REST service is changed. The mitigation of this issue is cov-
Save Return inference
ered by the machine learning utility class. From a technical point of view, new infer- trained model results (including
ence REST services result in new URL endpoints. The CL_ISLM_INFERENCE_PROVIDER metrics data)

machine learning utility class dynamically determines the inference REST endpoints
and provides a stable interface with the machine learning applications. For this, the
Provide Drop
request and response structure of the inference REST service must remain stable or model metrics trained model
be enhanced compatibly. (optional)

As mentioned earlier, on the SAP Data Intelligence side, the machine learning scenario
Delete
and pipeline artifacts must be defined. The training and inference pipelines cover the training data
necessary machine learning logic. Pipelines are modeled graphically based on opera- (if no deltas)
tors for transformation, validation, or incorporation of algorithms. The machine learn-
ing scenario constitutes a link among all development artifacts in SAP Data Intelligence
to resolve lifecycle management. The training and inference pipelines are exposed by
REST services to the SAP S/4HANA platform. The machine learning logic ABAP class is
required for wrapping those REST services and making them consumable by ABAP
Figure 4.16 Design of Training and Inference Pipelines

112 113
4 Architecture 4.5 Side-by-Side Predictive Analytics

4.5 Side-by-Side Predictive Analytics insights helps us to understand revenue contribution trends at a more granular
level, such as by region or product. With the click of a button, machine learning algo-
In a side-by-side setup with SAP Analytics Cloud, smart assist expands the conversation rithms run in the background to analyze all the data relevant to the selected infor-
beyond just visualizations, charts, and data connectivity, offering easy-to-consume mation. First, suggested visualizations ranked in order of relevance are presented.
machine learning capabilities embedded deeply within SAP Analytics Cloud, alongside Then, these visualizations can be added to an SAP Analytics Cloud story along with a 4
and integrated with analytics and planning. The smart features within SAP Analytics text explanation thanks to the natural language generation engine.
Cloud make insight discovery faster by bringing data science to the masses. Intelligent
쐍 Smart discovery
machine learning technology drives the analytics process while reducing human bias,
Acts as a digital business analyst. It automates the data exploration process to reveal
ensuring that decision makers can act with confidence. Figure 4.17 depicts the architec-
information that is statistically relevant. Trained machine learning models that are
ture of the predictive analytics services provided by SAP Analytics Cloud, including sev-
specific to customer data generate an overview of significant patterns, outliers, key
eral smart assist features.
drivers, and influencers. Then, an interactive what-if simulation is created based on
the model, allowing you to explore the possible results of changing factors and vari-
SAP Fiori UI Explorative UI
ables. With the autogenerated story from smart discovery, the data speaks for itself.
Intelligent algorithms remove the need for analytics to be fully human-led, reducing
Smart
services bias to ensure that important trends are not missed.

Predictive 쐍 Search to insight


SAP S/4HANA SAP Analytics Cloud
analytics Makes content creation easier with the power of natural language query. To use
Application search to insight, simply ask a question about the data, and SAP Analytics Cloud will
Application content: models/stories
intelligently create relevant visualizations that can be added to stories.

Automated Smart Smart Smart Search


A dataset is an SAP Analytics Cloud entity representing a collection of homogenous
predictive library predict insights discover insight data (basically a database table) that can be produced and consumed in different SAP
Analytics Cloud workflows. Typical workflows are data acquisition, consisting of creat-
ing a dataset from data located in an external system, and story building, consisting of
Application
Data integration Business data lake creating a dashboard using a dataset. The physical location of data held by the dataset
data
is complemented by a dataset description that comprises information for each column
like the data type, length, format, and semantic information (e.g., latitude, longitude,
Figure 4.17 Predictive Analytics Architecture
country), plus more predictive-specific information like the category (e.g., nominal,
ordinal). The data integration infrastructure of the SAP Analytics Cloud platform pro-
As depicted in Figure 4.17, the smart assist functionality is covered by the following
vides two data access modes for the smart assist features:
components (which we introduced in Chapter 3, Section 3.4.2):
1. Data-acquisition mode
쐍 Smart predict
In this mode, data is either transferred from external systems like SAP S/4HANA or
Augments existing business intelligence capabilities by learning from your historical
uploaded from the end user environment to the SAP Analytics Cloud platform and
data to predict what is most likely to happen in the future. With classification, re-
processed. This offline approach safeguards the resource consumption of the exter-
gression, and time series forecast algorithms, smart predict creates high-performing
nal systems and allows a scale-out of predictive processing on SAP Analytics Cloud.
and stable models to help you optimize operations and drive strategic decisions for
Its drawback is that the offline data can become outdated with time and must be
growth. Smart predict makes machine learning accessible by automatically handling
updated on a regular basis.
complex data science procedures. This allows business analysts to focus on imple-
menting insights to influence existing business processes. 2. Live-connection mode
In this mode, data stay on external systems like SAP S/4HANA and are processed
쐍 Smart insights
there as well. In the context of smart assist, usually the SAP HANA database with APL
Reveals the top contributors behind a specific data point or variance. This feature is
installed is required. With the live connection, real-time access to data is provided so
particularly useful when we are looking at aggregated data, such as revenue. Smart

114 115
4 Architecture 4.5 Side-by-Side Predictive Analytics

that the latest state of the application data is always considered. However, for pro- the future, it is planned to provide a pipeline-based editor targeting the maverick data
cessing APL directly on the online data, greater CPU time and RAM in the external scientist. In addition to providing support for managing model specifications, smart
system are consumed. Currently, live-connection mode is implemented for access predict core services implement the concept of a task, typically encapsulating model
to application data on the database system but not on the application server level. training or applying work and a mechanism for executing such tasks in a regulated
fashion, preventing the overload of underlying automated engines. Tasks pertaining to 4
Datasets can have one of two origins. They can be either the result of a data acquisition
models authored through the automated UI and handled by the automated engine are
or can be the result of a predictive model application. This relates to the role a dataset
exposed as a Cloud Foundry application. The associated composer models are pro-
can have:
cessed by an embedded composer engine by delegating the execution to the APL in
쐍 Training dataset SAP HANA. Execution of automated tasks involves interaction with the automated
A dataset can be used as the training dataset for a predictive model. In this context, engine through a synchronous and stateful KxCommonInterf/Thrift protocol.
the dataset contains valid values for the model’s explanatory variables and target
variables. The data will be used to optimize the model fit. SAP S/4HANA SAP Analytics Cloud/SAP Cloud Platform
application server
쐍 Apply-in dataset
Browser
A dataset can be used as the input for the application of a predictive model. In this Smart predict SAP HANA
Smart assist UI
context, the dataset contains values for the model’s explanatory variables but not client SAP HANA XS
for the target variables, the goal being precisely to evaluate the value of that target SAP HANA SAP Analytics
Cloud predictive
variable using a trained model. SAP Analytics Cloud
agent
쐍 Apply-out dataset Smart predict Predictive
SAP HANA script server
A dataset can be used as the output for the application of predictive model. In this SAP HANA script server core services services Automated
predictive library
context, at the end of the application phase, the dataset will contain the estimated Automated
predictive library R
value of the target variable for all the records of the apply-in dataset.
R R

Smart assist can be consumed in SAP Analytics Cloud stories and from there integrated Task manager service SAP HANA index server
SAP HANA index server Acquired business
into SAP S/4HANA UIs. A story is a presentation-style document that uses charts, visu-
data
Live business
alizations, text, images, and pictograms to describe data. Once a story is created or data Predictive
opened, pages, sections, and elements can be added and edited. The story toolbar is Live predictive Smart predict processing server models
divided into different categories such as File, Insert, Data, and Tools to help users find models
Composer Automated
Debriefing
data
options and perform tasks more efficiently. Owners of stories can share them with Live debriefing engine engine
data
other users and grant permissions for these stories. After stories are shared, users with
view permissions can analyze the data by navigating within the stories.
Figure 4.18 Smart Predict Architecture
We’ll focus mainly on the smart predict architecture, which enables the implementa-
tion of predictive analytics generically. The remaining smart assist features are pro- The smart predict core services provide for automated and composer models for author-
vided as built-in functionality in the SAP Analytics Cloud infrastructure for direct ing, debriefing, entity management, and task management services. The automated
usage. Another reason for concentrating on smart predict is that most of the smart engine supports a native mode in which the engine itself executes the predictive algo-
assist functions are based on this service. Figure 4.18 illustrates the detailed architec- rithms based on the data it fetches over open database connectivity (ODBC) from the
ture of smart predict. SAP HANA instance. In a delegated mode, the automated engine hands over the pro-
In SAP Analytics Cloud, predictive features essentially fall into smart predict—which cessing of the predictive algorithms to APL running in the SAP HANA instances, pre-
provides for managing model authoring and storage and for training models and venting the data from being moved from the database to the engine. The SAP HANA
applying them—and smart assist—which is an umbrella for a number of predictive fea- instance of SAP Analytics Cloud stores the predictive models (physical model settings,
tures built on top of the predictive cloud services, like smart discovery and smart scoring equations, and model raw statistics), the predictive model debriefing informa-
insight. Smart predict bundles two different authoring experiences, a purely form- tion (model statistics), and the physical data that are accessed and produced during the
based and easy-to-consume automated UI geared toward the nontechnical user and, in execution of the predictive workflows.

116 117
4 Architecture

4.6 Summary
In this chapter, we explained what makes SAP S/4HANA intelligent and how this is
related to automation. We gave a brief overview of technical challenges that must be
solved in the context of SAP S/4HANA regarding machine learning and predictive ana-
lytics. For understanding the structure of the already delivered scenarios, we shared
the application patterns that have been identified so far. To enable you to use the exist-
ing SAP S/4HANA machine learning and predictive scenarios, we explained the solu-
tion architecture behind them.
This knowledge is the foundation for the next chapter, in which we will describe how to
implement your own machine learning and predictive analytics use cases step by step
according to the SAP S/4HANA programming model. We will also share with you how
to resolve advanced aspects like lifecycle management, GDPR, and model degradation,
which are crucial in the context of enterprise applications such as SAP S/4HANA.

118
Contents

Preface ....................................................................................................................................................... 13

1 Introduction to Predictive Intelligence 19

1.1 The Intelligent Enterprise .................................................................................................. 19

1.2 How Predictive Intelligence Is Evolving at SAP ........................................................ 22

1.3 Connected End-to-End Scenarios ................................................................................... 24


1.3.1 Modular Approach ................................................................................................. 25
1.3.2 Example Scenarios ................................................................................................. 25
1.4 Analytics of the Future ........................................................................................................ 32
1.4.1 Unified Analytics ..................................................................................................... 33
1.4.2 Business Problems and Business Needs ......................................................... 34
1.4.3 Trends and Technologies ..................................................................................... 35
1.4.4 User Roles with Analytics .................................................................................... 35
1.5 Summary ................................................................................................................................... 37

2 The Evolution of Predictive Analytics and


Machine Learning at SAP 39

2.1 Predictive Analytics and Machine Learning before SAP S/4HANA ................. 39

2.2 Technologies and Methodologies .................................................................................. 40


2.2.1 Automated Analytics ............................................................................................. 41
2.2.2 Expert Analytics ...................................................................................................... 44
2.3 Best Practices ........................................................................................................................... 45

2.4 Summary ................................................................................................................................... 48

3 Tools, Technologies, and Services 49

3.1 Machine Learning and Predictive Analytics Approaches ..................................... 49

3.2 Embedded Machine Learning and Predictive Analytics ....................................... 51


3.2.1 Overview .................................................................................................................... 51

7
Contents Contents

3.2.2 Embedded Machine Learning with the SAP HANA Automated 5.2.2 Coded Approach Based on the SAP HANA Predictive Analysis
Predictive Library .................................................................................................... 53 Library ......................................................................................................................... 131
3.2.3 Embedded Machine Learning with the SAP HANA Predictive 5.3 Implementing Side-by-Side Machine Learning Applications ............................ 137
Analysis Library ....................................................................................................... 55
5.3.1 Required Development in SAP Data Intelligence ......................................... 137
3.3 SAP Cloud Platform ............................................................................................................... 57 5.3.2 Required Development in ABAP ........................................................................ 144
3.3.1 SAP Data Intelligence ............................................................................................ 57 5.4 Implementing Side-by-Side Predictive Analytics Applications ......................... 148
3.3.2 Hybrid Machine Learning Models ..................................................................... 62
5.5 Application Management Processes ............................................................................. 155
3.4 SAP Analytics Cloud .............................................................................................................. 63
5.5.1 Lifecycle Management ......................................................................................... 155
3.4.1 Overview .................................................................................................................... 63 5.5.2 Data Integration ..................................................................................................... 169
3.4.2 Smart Assist Services ............................................................................................. 65 5.5.3 Data Protection and Privacy ................................................................................ 183
3.4.3 Smart Predict Services .......................................................................................... 67 5.5.4 Configuration .......................................................................................................... 194
3.5 SAP Intelligent Robotic Process Automation ............................................................ 70 5.5.5 Extensibility .............................................................................................................. 200
3.6 SAP Internet of Things ......................................................................................................... 76 5.5.6 Model Degradation ................................................................................................ 215
5.5.7 Explanation of Results .......................................................................................... 221
3.7 Summary ................................................................................................................................... 80
5.5.8 Workload Management and Performance .................................................... 229
5.5.9 Legal Auditing .......................................................................................................... 237
5.5.10 Model Validations .................................................................................................. 244
4 Architecture 83 5.5.11 User Interface Design ............................................................................................ 252
5.6 Summary ................................................................................................................................... 260
4.1 Introduction ............................................................................................................................. 83
4.1.1 Technical Challenges in SAP S/4HANA ........................................................... 83
4.1.2 How to Operationalize Intelligence ................................................................. 84
6 Business Implementation 261
4.2 Architecture Overview ........................................................................................................ 90
4.2.1 Machine Learning Application Patterns ......................................................... 90 6.1 Overview of Intelligent Scenarios .................................................................................. 261
4.2.2 Guiding Principles for Solution Architecture ................................................ 94 6.1.1 Creating a Purchase Requisition as an Employee ........................................ 262
4.2.3 Solution Architecture ............................................................................................ 95 6.1.2 Processing a Purchase Requisition as an Operational Purchaser ........... 263
4.3 Embedded Machine Learning ........................................................................................... 97 6.1.3 Monitoring the Spend as a Strategic Purchaser ........................................... 264
6.1.4 Creating Sales Inquiries as a Sales Manager ................................................. 264
4.4 Side-by-Side Machine Learning ....................................................................................... 102
6.1.5 Recording Financial Transactions as an Accounts Receivable
4.5 Side-by-Side Predictive Analytics ................................................................................... 114 Manager .................................................................................................................... 265
4.6 Summary ................................................................................................................................... 118 6.2 Configuration Basics ............................................................................................................ 266
6.2.1 SAP Best Practices Explorer ................................................................................. 267
6.2.2 SAP Help Portal ........................................................................................................ 271
5 Technical Implementation 119 6.3 Finance ....................................................................................................................................... 272
6.3.1 SAP Cash Application ............................................................................................ 273
5.1 Approach Comparison ......................................................................................................... 119 6.3.2 Accounting and Financial Close ......................................................................... 280
6.3.3 Financial Planning and Analysis ........................................................................ 285
5.2 Implementing Embedded Machine Learning Applications ................................ 122
6.3.4 Governance, Risk, and Compliance .................................................................. 289
5.2.1 Generated Approach Based on the SAP HANA Automated Predictive
6.3.5 Detect Abnormal Liquidity Items ...................................................................... 293
Library ......................................................................................................................... 123

8 9
Contents Contents

6.4 Sourcing and Procurement ................................................................................................ 295 7 Services on SAP Cloud Platform 375
6.4.1 Contract Consumption ......................................................................................... 296
6.4.2 Propose Resolution for Invoice Payment Block ............................................ 297
7.1 Key Trends and Capabilities .............................................................................................. 375
6.4.3 Supplier Delivery Prediction ................................................................................ 299
6.4.4 Proposal of New Catalog Item ........................................................................... 300 7.2 SAP Data Intelligence .......................................................................................................... 382
6.4.5 Proposal of Material Group ................................................................................. 301 7.3 Machine Learning .................................................................................................................. 383
6.4.6 Proposal of Options for Materials without Purchase Contract ............... 303
7.4 Internet of Things .................................................................................................................. 386
6.4.7 Image-Based Buying .............................................................................................. 305
6.4.8 Intelligent Approval Workflow .......................................................................... 306 7.5 Blockchain ................................................................................................................................. 387
6.4.9 Blockchain-Verified RFQ Processing ................................................................. 307 7.6 Summary ................................................................................................................................... 388
6.5 Inventory and Supply Chain ............................................................................................. 308
6.5.1 Stock in Transit ........................................................................................................ 309
6.5.2 Demand-Driven Replenishment ........................................................................ 311 8 The Road Ahead and Further Learning 389
6.5.3 Defect Code Proposal with Text Recognition ............................................... 313
6.5.4 Early Detection of Slow and Nonmoving Stock ............................................ 315
8.1 Upcoming Features and Functionality ......................................................................... 389
6.6 Sales ............................................................................................................................................. 317 8.1.1 Embedded Predictive Models ............................................................................. 389
6.6.1 Predict Conversion of Sales Quotations to Sales Orders ........................... 318 8.1.2 Machine Learning Models on SAP Cloud Platform ...................................... 390
6.6.2 Predict Sales Forecasts .......................................................................................... 319 8.1.3 SAP Analytics Cloud ............................................................................................... 391
6.6.3 Predict Delivery Delay ........................................................................................... 322 8.1.4 Extensions of Existing Approaches .................................................................. 392
6.7 Research and Development/Engineering .................................................................. 323 8.2 Blogs for Continuous Information ................................................................................. 392
6.7.1 Project Cost Forecasting ....................................................................................... 324
8.3 Summary ................................................................................................................................... 393
6.7.2 Digital Content Processing .................................................................................. 325
6.8 Industries ................................................................................................................................... 327
6.8.1 Professional Services ............................................................................................. 327
The Authors ............................................................................................................................................. 395
6.8.2 Component Manufacturing ................................................................................ 336
Index .......................................................................................................................................................... 397
6.8.3 Retail ........................................................................................................................... 342
6.8.4 Utilities ....................................................................................................................... 352
6.8.5 Consumer Products ............................................................................................... 357
6.8.6 Insurance ................................................................................................................... 360
6.8.7 Telecommunications ............................................................................................. 364
6.8.8 Banking ...................................................................................................................... 368
6.8.9 High-Tech .................................................................................................................. 370
6.8.10 Sports and Entertainment ................................................................................... 372
6.8.11 Public Services ......................................................................................................... 373
6.9 Summary ................................................................................................................................... 374

10 11
Index

A Analyze demand ...................................................... 28


Analyze spend .......................................................... 28
A/B testing ............................................................... 245 Anomaly detection .............................................. 364
ABAP application server ...................... 97, 99, 159 Application logs .................................................... 237
side-by-side model ........................................... 103 Application management ................................. 155
ABAP CDS Reader .................................................. 180 Application patterns .............................................. 90
ABAP class ............................................. 108, 120, 162 Apply-in dataset .................................................... 116
enable for customer extension ................... 110 Apply-out dataset ................................................. 116
prerequisite checks .......................................... 164 Architecture ............................................................... 83
utility ..................................................................... 168 embedded model ................................................ 97
ABAP Class Builder ..................................... 133, 145 guiding principles ............................................... 94
ABAP development .............................................. 144 machine learning ............................................... 90
ABAP editor ............................................................. 213 SAP Analytics Cloud ....................................... 114
ABAP environment .............................................. 377 SAP S/4HANA ....................................................... 95
ABAP in Eclipse ...................................................... 131 side-by-side model .......................................... 102
ABAP lifecycle management ............................... 55 Artifacts ........................................................... 119, 158
ABAP Workbench .................................................. 247 configuration and extensibility ................. 195
Accounting .................................................... 280, 284 custom ................................................................. 214
Accounts receivable clerks ................................ 275 Artificial intelligence (AI) ..................................... 21
Accounts receivable manager ...... 265, 273, 289 evolution ................................................................ 22
Accruals .................................................................... 283 Association rules ..................................................... 42
Accruals management ........................................ 282 Assortment lists .................................................... 345
Accruals prediction .............................................. 282 Assortment planning ......................................... 345
Accuracy KPIs ......................................................... 216 Attachment service ............................................. 182
Action execution ..................................................... 86 Attended automation ............................................ 71
Affinity analysis .................................................... 346 Audit execution .................................................... 243
Algorithm exchange ............................................ 201 Audit planning ...................................................... 243
technical implementation ............................ 208 Audit preparation ................................................ 243
Algorithms ................................................... 19, 46, 95 Auditing ................................................................... 238
APL ......................................................................... 101 entities ................................................................. 238
basic ......................................................................... 22 phases .................................................................. 242
categorization ...................................................... 93 Auditors ................................................................... 239
embedded machine learning ........... 23, 52, 98 Augmented analytics ................................... 67, 391
matching ................................................................ 91 Auto classification .................................................. 45
operator ............................................................... 141 Automated analytics .............................................. 41
PAL ......................................................................... 102 principles ................................................................ 42
predictions ............................................................. 93 Automated decision-making .................... 15, 185
ranking .................................................................... 92 Automated Predictive Library (APL) ........ 22, 50,
recommendations .............................................. 92 52–53, 96, 122
SAP Analytics Cloud ........................................... 63 approach comparison ................................... 120
self-learning .......................................................... 13 extensibility .............................................. 208, 213
side-by-side machine learning ............. 59, 103 integration ......................................................... 101
strategy ................................................................... 43 maintain ............................................................. 125
AMDP class .......................... 55, 100–102, 120, 132 technical implementation ........................... 123
extensibility ........................................................ 209 Automated techniques ......................................... 88
implement ........................................................... 133 Automation ............................................................... 71
register ................................................................. 133

397
Index Index

B C Controlling .............................................................. 286 Data mining ............................................................... 42


Convergence speed ................................................. 42 Data persistency ...................................................... 97
Back orders ................................................................. 31 Capacity allocation ............................................... 351 Conversational AI .................................................... 93 Data pipelining ............................................... 61, 106
Backflush issues .................................................... 340 Cash and liquidity management .................... 293 Core data service (CDS) table functions ......... 53, Data Preview tool ................................................. 131
Bad debts .................................................................. 335 Cash collection ......................................................... 32 100, 130 Data protection and privacy ................... 172, 183
BAdI implementation ......................................... 209 Catalog items .......................................................... 300 Core data service (CDS) views .... 52, 64, 97, 100, business requirements ................................... 183
Banking ..................................................................... 368 Categorization ................................................ 93, 294 119, 130, 219 embedded machine learning ...................... 187
financial services data platform ................ 370 Category influence ............................................... 228 consumer-defined ............................................ 172 side-by-side machine learning ................... 190
upcoming ideas ................................................ 369 Change data capture approach ........................ 176 data extraction ................................................. 174 technical implementation ........................... 185
Behavioral insights .............................................. 374 Change indicator ................................................... 259 data integration ..................................... 171, 173 Data scientists ................................................ 67, 383
Best practices ............................................................. 45 Claims management ............................................ 359 data source extension .................................... 205 Data source extension ....................................... 205
Bid management .................................................. 328 Claims severity ....................................................... 361 extend ................................................................... 203 Data-acquisition mode ...................................... 115
Biometric bridge ................................................... 373 Classification ... 42–43, 45, 68, 93, 291, 294, 299, time-dependent ................................................ 221 Datasets ........................................................... 115, 139
Blockchain 302, 314, 325 Core data services (CDS) ........................................ 95 origins .................................................................. 116
mobile theft ........................................................ 365 Classification scenario ........................................ 148 Cost-optimal ordering ........................................ 351 Debrief cockpit ...................................................... 108
payment fraud prevention ........................... 365 Cloud Data Integration operator .......... 141, 180 Criticality .................................................................. 222 Decision tree ............................................................. 45
RFQ processing .................................................. 307 configuration ..................................................... 180 Cross product allocation .................................... 349 Decision-making ..................................................... 86
SAP Cloud Platform ............................... 379, 387 parameters .......................................................... 143 Custom Business Object app ............................ 207 Decoupled extensions ........................................ 214
Blocking ................................................. 184–185, 190 Cloud factory ...................................................... 73–74 features ................................................................ 208 Defect code proposal .......................................... 313
Custom CDS Views app ............................ 206, 213 Defect processing ................................................. 313
Bonded loans management ............................. 369 Cloud Foundry ........................................................ 117
Defect recording ................................................... 339
Buffer levels ............................................................ 312 Cloud scalability .................................................... 376 Custom field extensions .................................... 202
Defects ...................................................................... 313
Business add-ins (BAdIs) .................................... 209 Clustering ................................................................... 44 Custom tables ......................................................... 207
Degradation component .......................... 219–220
Business administrators .......................... 157, 161 Collaboration .......................................................... 379 Custom visualizations ........................................... 64
Delayed feedback ................................................. 218
Business customer analytics ............................ 368 Collaborative enterprise planning ................. 391 Customer Business Object app ........................ 213
Deletion ................................................. 184–185, 190
Business entity recognition ............................. 386 Commercialization ............................................... 378 Customer invoicing ................................................ 32
Delivery class A ..................................................... 176
Business experts ................................................... 157 Compatibility matching ....................................... 91 Customer profile from insurance .................. 363
Delivery delays ...................................................... 299
Business feature .................................................... 246 Complexity .............................................................. 222 Customer profitability analysis ............ 356, 364
predict .................................................................. 322
Business implementation ................................. 261 Component manufacturing ............................. 336 Customer scenarios ................................................ 46
Delivery insights ...................................................... 79
banking ................................................................ 368 Composer engine .................................................. 117 Customer service chatbot ................................. 367
Delivery performance ............................... 317, 322
component manufacturing ......................... 336 Configuration ......................................................... 194 Customers ................................................................ 326
Delta handling ....................................................... 170
configuration ..................................................... 266 business implementation .............................. 266 Customer-specific tables ................................... 207
approaches ......................................................... 176
consumer products .......................................... 357 business requirements .................................... 194
Delta loads ............................................................... 170
finance .................................................................. 272 lifecycle management .................................... 194 D Demand Data Foundation (DDF) ................... 346
high-tech .............................................................. 370 model hyperparameter .................................. 199 Demand signal management .......................... 358
industries ............................................................. 327 multiple model support ................................. 197 Data acquisition ....................................................... 86 Demand-driven replenishment ..................... 311
insurance ............................................................. 360 technical implementation ............................ 195 Data actions monitoring ................................... 391 Deployment .................................................. 156, 166
inventory and supply chain ......................... 308 Connection Management app ......................... 137 Data attribute recommendation .................... 385 test ......................................................................... 167
professional services ....................................... 327 Consent ................................................. 184, 186, 190 Data change support ........................................... 173 Deprecation ............................................................ 214
public services ................................................... 373 embedded machine learning ....................... 188 Data connectivity .......................................... 35, 104 Desktop agents .................................................. 73–74
R&D/engineering ............................................. 323 side-by-side machine learning .................... 193 Data extraction ............................................ 171, 174 Desktop studio .................................................. 73–74
retail ...................................................................... 342 Consent management data ............................... 189 annotation schema ......................................... 177 Developers ........................................... 157, 161, 240
sales ....................................................................... 317 Consistency ............................................................. 172 steps ....................................................................... 175 DevOps ............................................................ 156, 378
sourcing and procurement .......................... 295 Consumer demand forecast ............................. 352 Data governance ..................................... 60, 62, 104 Digital content processing ............................... 325
sports and entertainment ............................. 372 Consumer products ............................................. 357 Data integration .................................................... 169 Digital transformation ................................... 20, 22
telecommunications ....................................... 364 upcoming ideas ................................................. 360 business requirements ................................... 170 Digitization ............................................................. 326
utilities .................................................................. 352 Consumption API ........................................ 146, 211 model .................................................................... 171 Disruption ............................................................... 376
Business integrity screening ............................ 290 Consumption API extension ............................ 201 pipelines and operators ................................. 179 Dockerfiles .............................................................. 180
Business services ........................................... 58, 376 technical implementation ............................ 210 solution characteristics ................................. 171 Document classification ................................... 384
Business users ....................................... 24, 157, 159 Containers ................................................................ 236 technical implementation ............................ 173 Document information extraction ............... 385
Business validation .............................................. 249 Content recommendations ................................ 91 Data landscape management ............................. 61 Document management ................................... 379
Continuous accounting ...................................... 284 Data locking ............................................................ 391 Drift and skew detection .......................... 217, 219
Contract consumption ........................................ 296 Data management ...................................... 105, 377 Dynatrace service ................................................. 378

398 399
Index Index

E Extensibility (Cont.) Goods receipt ............................................................ 27 Intelligent approval workflow ........................ 306
APIs ........................................................................ 211 Governance, risk, and compliance (GRC) .... 289 Intelligent bad debts risk analyzer ................ 335
Electricity supply .................................................. 354 artifacts ................................................................ 195 GR/IR account reconciliation ........................... 281 Intelligent bid management ............................ 328
Email to record ...................................................... 362 business requirements .................................... 201 Intelligent enterprise ............................................. 19
Embedded machine learning ............... 50–51, 97 custom API extension ..................................... 210 H analytics ................................................................. 33
ABAP integration ................................................ 99 lifecycle management .................................... 214 end-to-end scenarios .................................. 24–25
algorithms ............................................................. 98 machine learning logic extension ............. 208 Helm .......................................................................... 236 evolution ................................................................ 20
APL ........................................................ 53, 101, 123 new machine learning app ........................... 212 High-tech ................................................................. 370 strategy ............................................................ 21–22
approach comparison .......................... 119, 121 technical implementation ............................ 202 Hiring managers ................................................... 331 Intelligent invoice-to-cash ............... 31, 264–265
criteria ..................................................................... 53 training data source extension ................... 202 Horizon-wide mean absolute percentage Intelligent matching ........................................... 254
data protection and privacy ........................ 187 upcoming features ........................................... 392 error (horizon-wide MAPE) .......................... 152 Intelligent overdraft decisions ....................... 370
inferencing .......................................................... 168 Extensibility lifecycle management .... 202, 214 Hybrid models .......................................................... 62 Intelligent procure-to-invoice ................. 26, 262
PAL ........................................................ 55, 101, 131 Extensibility registry ........................................... 205 Hyperledger Fabric ............................................... 388 Intelligent project profitability
technical implementation ............................ 122 Extension includes ..................................... 202, 204 monitoring ......................................................... 332
training ................................................................... 98 External ID ............................................................... 145 I Intelligent quote-to-order ................................... 29
workload management and External nodes ....................................................... 388 Intelligent robotic process automation
performance ........................................ 230–231 Idea to design ......................................................... 323 architecture ........................................................... 73
Embedded machine learning service ........... 287 F Identity Authentication service ...................... 382 bot making ............................................................ 75
End user feedback ................................................. 239 Image-based buying ............................................ 305 deployment ........................................................... 73
End users ........................................................... 36, 240 Factory data ............................................................. 371 Implausible meter readings ............................. 353 overview ................................................................. 71
End-of-purpose check ......................................... 185 Feature toggle ......................................................... 246 Implicit feedback ........................................ 217, 220 phases ..................................................................... 72
End-to-end scenarios ..................................... 24–25 Feedback loops ................................... 215, 217, 253 Implicit selection .................................................. 172 Intelligent rollover ............................................... 369
intelligent invoice-to-cash ..................... 31, 264 Finalizing action .................................................... 255 In-Arena Coaching app ....................................... 372 Intelligent scenario lifecycle management
intelligent order-to-cash ............................... 274 Finance ...................................................................... 272 Industries ................................................................. 327 (ISLM) framework ....................... 50–51, 53, 122
intelligent procure-to-invoice .............. 26, 262 Finance controllers ..................................... 325, 335 banking ................................................................ 368 APL ............................................................................ 53
intelligent quote-to-order ................................ 29 Financial close ........................................................ 280 component manufacturing ......................... 336 architecture ........................................................... 98
intelligent sell-from-stock ............................... 30 Financial planning and analysis ...................... 285 consumer products .......................................... 357 connect to SAP Data Intelligence .............. 147
intelligent source-to-contract .............. 27, 264 Financial transactions ......................................... 265 high-tech .............................................................. 370 deployment ........................................................ 167
Energy providers ................................................... 354 Flood prediction and emergency insurance ............................................................. 360 inferencing ......................................................... 168
Engineering ............................................................. 323 management ...................................................... 373 professional services ....................................... 327 intelligent scenarios ....................................... 160
Enterprise portfolio and project Forecasting ................................................................. 42 public services ................................................... 373 KPIs ....................................................................... 165
management ..................................................... 323 Free-text items ....................................................... 300 retail ...................................................................... 342 lifecycle management ................................... 159
Enterprise readiness ..................................... 84, 155 Full match .................................................................. 90 sports and entertainment ............................. 372 model validation ............................................. 250
Enterprise reporting ............................................ 391 Functional services ................................................. 58 telecommunications ....................................... 364 monitoring ......................................................... 169
Event-based scheduling ..................................... 232 Further learning ........................................... 389, 392 utilities .................................................................. 352 PAL ............................................................................ 55
Experimentation ................................................... 105 blogs ....................................................................... 392 Inference ........................................ 60, 107, 168, 230 phases and roles ............................................... 161
Expert analytics ........................................................ 44 API ....................................................... 158, 196, 242 pipelines .............................................................. 140
Explainability ......................................................... 226 G consume .............................................................. 146 prerequisite check ............................................ 163
Explainable machine learning .............. 221, 253 display results .................................................... 131 provide metadata ............................................ 134
backend processes ........................................... 226 GDPR workbench ........................................ 191, 193 logic ....................................................................... 136 side-by-side machine learning ................... 161
business requirements ................................... 222 General Data Protection Regulation pipelines ............................................ 112, 140, 144 smart predict ........................................................ 70
technical implementation ............................ 222 (GDPR) ................................................................... 183 request and response ...................................... 238 steps ......................................................................... 54
training ................................................................ 227 embedded machine learning ....................... 188 side-by-side model ........................................... 110 training ................................................................ 166
user interface ..................................................... 223 requirements ...................................................... 184 Information analysis .............................................. 86 upcoming features .......................................... 389
Explanation levels ................................................ 223 side-by-side machine learning .................... 190 Initial loads .............................................................. 170 Intelligent Scenario Management app ........ 123,
user interface ..................................................... 224 General ledger ........................................................ 289 Input assistance .............................................. 91, 256 128, 147, 161, 233, 249
Explanations ................................................. 222–223 Generalization capacity control ........................ 43 Inspection plans .................................................... 338 Intelligent scenarios ............... 102, 108, 123, 197
component ......................................................... 226 Global explanation ............................................... 226 Insurance ................................................................. 360 business implementation ............................. 261
elements ............................................................... 224 Global international mobile equipment upcoming ideas ................................................ 363 create .................................................................... 161
Explicit feedback ................................ 218, 220, 250 identity storage and service ......................... 365 Intelligence ................................................................. 84 create based on APL ....................................... 124
Extensibility ..................................................... 50, 200 Globalization ........................................................... 378 Intelligent Account Finder for Payments create based on PAL ....................................... 132
algorithm exchange ........................................ 208 Globally unique identifier (GUID) .................. 162 app ......................................................................... 368 create based on SAP Data Intelligence ... 144

400 401
Index Index

Intelligent scenarios (Cont.) Legal contracts .......................................................... 29 Machine learning scenario (Cont.) O
input tab .............................................................. 126 Lifecycle management ....................... 58, 104, 155 details ................................................................... 138
lifecycle management .................................... 160 business requirements .................................... 155 release ................................................................... 144 ObjectStore .................................................... 183, 377
multimodal ......................................................... 391 configuration ..................................................... 194 unique identifier ............................................... 139 Off-contract spend ............................................... 303
output tab ........................................................... 127 deployment ......................................................... 166 Machine learning scenario manager ............... 62 Offline validation ................................................. 247
publish .................................................................. 109 inferencing .......................................................... 168 Mapping rules ........................................................ 233 Online validation ................................................. 247
train ............................................................. 128, 147 monitoring .......................................................... 169 Master data .............................................................. 381 Open receivables ..................................................... 32
user interface ..................................................... 251 prerequisite check ............................................. 163 Matching ................................................. 90, 254, 276 Open Service Broker API (OSBAPI) ................ 378
Intelligent Scenarios app ...... 123, 144, 161, 213 technical implementation ............................ 158 user interface ..................................................... 254 Operational data provider (ODP)
Intelligent sell-from-stock ................................... 30 training ................................................................. 165 Matching groups ................................................... 254 framework .......................................................... 174
Intelligent source-to-contract .................. 27, 264 Liquidity items ....................................................... 294 Material groups ..................................................... 301 Operational purchasers ..................................... 301
Intelligent staffing and resource Live-connection mode ........................................ 115 Material tracing ..................................................... 372 Operationalization ................................................. 84
management ..................................................... 331 Local accounting principles .............................. 281 Materials without a purchase contract ........ 303 business view ........................................................ 88
Intelligent store management ........................ 351 Local APIs .................................................................. 211 Metrics component ............................................. 219 methodology ........................................................ 85
Intelligent technologies ........................................ 21 Local explanation ........................................ 226, 228 Misdirected payments ........................................ 368 technology view .................................................. 88
Intelligent WIP project tracking ...................... 333 Location cluster sets ............................................ 344 ML Scenario Manager app ................................. 137 Operators ........................................................ 106, 179
Intelligent workforce planning ....................... 330 Lockbox information ........................................... 277 Mobile devices ....................................................... 366 Order-to-cash process ............................... 274, 317
International Mobile Equipment Identities benefits ................................................................. 278 Model accuracy KPIs ............................................ 130 Outgoing payments ............................................ 279
(IMEIs) ................................................................... 365 Logging ............................................................ 237, 240 Model degradation ..................................... 215, 220 Outliers ..................................................................... 152
Internet of Things (IoT) ......................................... 76 entities ........................................................ 238, 241 business requirements ................................... 215 Output batches ...................................................... 341
SAP Cloud Platform ............................... 380, 386 solution architecture ...................................... 218 Output control ...................................................... 182
use cases ................................................................. 78 M technical implementation ............................ 215 Output management ................................. 182, 380
Intrinsic interpretability .................................... 226 Model dispatcher .................................................. 197 Outsorted billing documents .......................... 356
Inventory accounting ......................................... 280 Machine learning ............................................. 13, 51 Model hyperparameter ............................ 194, 199 Overdue Materials—Stock in Transit
Inventory management ..................................... 308 application patterns .......................................... 90 user interface ..................................................... 200 app ................................................................ 309–310
Inventory managers .................................. 309, 312 approaches ............................................................ 49 Model validation ................................................... 244
Invoice inspector .................................................. 363 architecture .................................................... 83, 90 business requirements ................................... 244 P
Invoice object recommendation .................... 386 best practices ........................................................ 45 solution architecture ...................................... 249
Invoice payment blocks ..................................... 297 business implementation .............................. 261 technical implementation ............................ 245 Packaged solutions ................................................. 46
Invoice payment forecasting ........................... 289 decision tree .......................................................... 50 user interface ..................................................... 251 Parametric models ................................................. 93
IT users ......................................................................... 36 embedded ................................................ 50–51, 97 Model versions ...................................................... 129 Partial match ............................................................. 91
ethical considerations ...................................... 14 Modeler app ............................................................ 137 Payables line item matching ........................... 279
J evolution ................................................................ 39 Modular approach ................................................... 25 Payment advice information extraction .... 276
explanations ....................................................... 222 Monitoring ........................................... 157, 159, 169 Payment fraud prevention ............................... 365
Jupyter Notebook ....................... 62, 105, 139–140 hybrid models ...................................................... 62 module ................................................................. 219 Performance ........................................................... 230
JupyterLab ......................................................... 60, 106 model ..................................................................... 216 MultiChain .............................................................. 388 measurements .................................................. 232
SAP AI Business Services ................................ 384 Multicloud ............................................................... 388 Periodic valuation ................................................ 280
K SAP Analytics Cloud .......................................... 63 Multiple deployments ........................................... 95 Personal data .......................................................... 184
SAP Cloud Platform ............................... 380, 383 Multiple model support ........................... 194, 197 Pipeline modeler ......................................... 106–107
Key performance indicators (KPIs) ................ 216 scenario .................................................................. 62 user interface ..................................................... 198 Pipelines ................................ 61, 106, 120, 139, 179
Key users ..................................................................... 36 side-by-side ........................................ 57, 102, 137 create .................................................................... 140
K-nearest neighbors .................................. 315, 325 technical challenges .......................................... 84 N extensibility ....................................................... 210
Kubelet ...................................................................... 236 technical implementation ............................ 119 inference ..................................................... 112, 144
Kubernetes .................................................... 236, 376 technologies and methodologies ................. 40 Natural language processing (NLP) ....... 65, 367, templates ............................................................ 140
upcoming features ........................................... 389 383 training .................................... 107–108, 112, 141
L Machine learning logic extension .................. 201 Negative feedback ................................................ 217 Planning rules ........................................................ 345
technical implementation ............................ 208 Neural network ......................................................... 45 Pods ........................................................................... 236
Lead time .................................................................. 312 Machine learning model validation .............. 247 New machine learning app ............................... 202 PostgreSQL .............................................................. 378
buffer replenishment ...................................... 312 Machine learning operations cockpit ........... 107 extensibility ........................................................ 212 Predict conversion ............................................... 318
Legal auditing ......................................................... 237 Machine learning scenario ... 108, 120, 158, 219 Node agents ............................................................ 236 Predicted Delivery Delay app .......................... 322
business requirements ................................... 237 consume ............................................................... 110 Nonparametric models ......................................... 93 Predicted store inventory ................................. 351
technical implementation ............................ 238 create ..................................................................... 138 Notification API ..................................................... 192 Prediction class ..................................................... 145

402 403
Index Index

Prediction confidence ............................... 130, 216 Production planners ............................................ 341 Receivables line item matching ...................... 274 Sales performance ............................................... 317
Prediction ledger ................................................... 285 Production planning ............................................ 341 lockbox information ....................................... 277 Sales plan .................................................................... 87
Prediction power ................................ 130, 215–216 Productization ........................................................ 105 payment advice information Sales quotation ...................................................... 317
Predictions ....................................................... 92, 154 Professional services ............................................ 327 extraction ....................................................... 276 predict conversion ........................................... 318
Predictions dashboard ........................................ 289 Profit and loss analysis ....................................... 287 Recommendation pattern ................................... 91 Sales quotation conversion rate .................... 319
Predictive accounting ......................................... 284 Progressive disclosure technique ................... 224 Recommendations ........................................ 91, 255 Sales representatives ................................. 318, 322
Predictive Analysis Library (PAL) ...... 22, 50, 52, Project cost forecasting ...................................... 324 catalog items ..................................................... 300 SAP AI Business Services ................................... 384
55, 96, 123 Project delivery ...................................................... 334 items ...................................................................... 256 services ................................................................. 384
approach comparison .................................... 120 Project managers ...................... 324, 332, 334–335 user interface ..................................................... 255 SAP Allocation Management .................. 343, 349
architecture ........................................................ 101 Project profitability .............................................. 332 Redis-as-a-service ................................................. 378 SAP Analytics Cloud ......... 33–34, 50, 63, 96, 289
Regression ......... 44, 68, 228, 291–292, 297–299, approach comparison ................................... 121
criteria ..................................................................... 56 Project tracking ...................................................... 334
310, 312, 316, 319, 323, 356 architecture ........................................................ 114
extensibility .............................................. 209, 213 Promotion analysis .............................................. 350
Regression scenario ............................................. 148 connect ................................................................... 69
integration .......................................................... 101 Promotion Analysis app ..................................... 350
Relationship matching .......................................... 91 create predictive scenario ............................ 148
model training .................................................. 102 Promotion management ................................... 346
Remittance Advice Extractor ........................... 274 dashboard .......................................................... 289
technical implementation ............................ 131 Promotions .............................................................. 350
Remote APIs ............................................................ 211 data access modes .......................................... 115
Predictive analytics ......................... 22, 32, 96, 282 Public services ........................................................ 373
Reporting ................................................................. 244 display prediction results ............................. 154
approaches .................................................. 49, 119 Purchase order processing ................................ 300
Request for quotation (RFQ) ...................... 30, 303 features ................................................................... 64
architecture ................................................... 83, 90 Purchase orders ....................................................... 27 model debriefing .............................................. 152
best practices ................................................ 34, 45 bots ........................................................................... 75 blockchain-verified processing ................... 307
Requests ................................................................... 238 overview .......................................................... 35, 63
business problems .............................................. 34 Purchase requisition .............................................. 27 process flow .......................................................... 64
Research and development (R&D) ................. 323
decision tree .......................................................... 50 create as an employee .................................... 262 roles .......................................................................... 69
REST APIs .................................................................. 161
embedded ............................................................... 51 image-based buying ........................................ 305 smart assist services .......................................... 65
REST inference call ............................................... 111
evolution ................................................................ 39 intelligent approval workflow ..................... 306 smart predict services ....................................... 67
Resynchronization ............................................... 171
SAP Analytics Cloud ........................................... 63 process by the operational purchaser ...... 263 store results ........................................................ 153
Retail .......................................................................... 342
side-by-side .................................................. 57, 114 Purchasers ...................................................... 298, 303 technical implementation ........................... 148
upcoming ideas ................................................ 350
technical implementation .................. 119, 148 Purchasing managers .......................................... 300 training ................................................................ 150
Retraining ...................................................... 112, 244
technologies and methodologies ................. 40 Python ....................................................................... 137 upcoming features .......................................... 391
Revenue accounting and reporting ............... 280
trends and technologies ................................... 35 workflows ........................................................... 115
Roadmap .................................................................. 389
unified ...................................................................... 33 Q embedded predictive models ....................... 389
SAP API Business Hub ........................................ 380
user roles ................................................................ 35 SAP API Management ......................................... 380
extensions ........................................................... 392
Predictive Analytics integrator (PAi) ..... 51, 161 Quality engineers ........................................ 314, 337 SAP Assortment Planning ....................... 343, 345
machine learning on SAP Cloud
architecture ........................................................... 98 Quality indicator ................................................... 255 SAP Audit Management ........................... 241–242
Platform .......................................................... 390
Predictive intelligence ........................................... 19 Quality inspectors ....................................... 338, 372 SAP Best Practices ......................................... 34, 269
SAP Analytics Cloud ........................................ 391
evolution ................................................................ 22 Quality management analytics ....................... 371 SAP Best Practices Explorer .............................. 267
Robot pricing .......................................................... 363 configuration guide ........................................ 269
Predictive maintenance ..................................... 354 Quality systems ..................................................... 245
Robot underwriting ............................................. 363 SAP Business Integrity Screening .................. 290
Predictive models .................................................... 40 Quality technicians .............................................. 314
Robotic process automation (RPA) ................... 71 SAP BW/4HANA ................................................ 33–34
Predictive scenarios ................................................ 65 Quorum ..................................................................... 388
Root cause analysis .............................................. 336 SAP Cash Application .......................................... 273
create ................................................... 69, 148, 150 Quota management ............................................. 231
Rule-based automation ......................................... 13 lockbox functionality ..................................... 278
properties ............................................................ 150 Quote negotiation .................................................. 30
Rule-based techniques ........................................... 88 payables line item matching ...................... 279
smart predict ........................................................ 68 R-visualizations ........................................................ 69 receivables line item matching .................. 274
training ................................................................ 150 R SAP Cloud for Energy .......................................... 352
types ...................................................................... 148
Preferred proposal ................................................ 257 R visualizations ........................................................ 64 S SAP Cloud Platform ................. 21, 23, 50, 57, 103
Ranking ............................................................. 92, 258 ABAP environment ......................................... 377
Prepacks .................................................................... 345 Sales ............................................................................ 317 analytics .............................................................. 377
Prerequisite checks .................................... 110, 163 by inherent value ................................................ 92
planning .............................................................. 319 application runtime ....................................... 382
methods ............................................................... 164 by score ................................................................... 92
Sales forecasts ........................................................ 319 blockchain ................................................. 379, 387
Presentation variants .......................................... 259 user interface ...................................................... 258
Sales inquiries ........................................................ 264 business logic ....................................................... 58
Procure-to-pay process ....................................... 295 value ...................................................................... 258
Sales managers ................................... 264, 319–320 capabilities ......................................................... 376
Product similarity scoring ................................ 347 Rating ........................................................................... 92
Sales order fulfillment monitoring ............... 319 continuous integration and delivery ....... 378
Production and inventory planners ............. 315 R-based logistic regression .................................. 45
Sales order probability ........................................ 319 data privacy and security ............................ 378
Production operators .......................................... 338 Read access ............................................................... 172 Sales orders ................................................................ 31 developer tools ................................................. 379
Real-time sensor data ............................................ 24

404 405
Index Index

SAP Cloud Platform (Cont.) SAP Fiori launchpad ............................................... 35 SAP Trade Management ..................................... 357 Snapshots ....................................................... 240–241
integration .......................................................... 380 SAP governance, risk, and compliance SAP Transactional Banking for Social network analysis ......................................... 42
Internet of Things (IoT) ................. 80, 380, 386 solutions .............................................................. 289 SAP S/4HANA .................................................... 368 Solution proposals .................................................. 91
machine learning ................................... 380, 383 SAP HANA ................... 25, 39, 45, 52, 97, 100, 377 SAP Translation Hub ........................................... 379 Sourcing and procurement .............................. 295
master data ........................................................ 381 libraries ................................................................... 99 SAPUI5 ....................................................................... 381 Spend monitoring ................................................ 264
mobile services .................................................. 381 SAP HANA Enterprise Cloud ............................... 47 Scalability ................................................................. 236 Sports and entertainment ................................ 372
orchestration ..................................................... 382 SAP HANA Optimization Function Library 349 Scenario scheduling ............................................. 108 SQL script procedures ..................................... 53, 99
rates and measures ......................................... 382 SAP HANA Python Client API ........................... 137 Scheduling ............................................................... 232 SQL views ................................................................. 119
SAP Data Intelligence ..................................... 382 SAP Help Portal ...................................................... 271 Scikit-Learn ........................ 140, 275, 280, 283, 326 Stability contracts ................................................ 173
services ....................................................... 375, 377 SAP Information Lifecycle Management Search to insight .............................................. 64–65 Staffing and resource management ............. 331
upcoming features .......................................... 390 (SAP ILM) .................................................... 172, 185 architecture ........................................................ 115 Statement memory limit .................................. 234
user experience ................................................. 381 SAP Integrated Business Planning for Supply benefits .................................................................... 66 Statement priority ............................................... 234
SAP Cloud Platform Integration ..................... 380 Chain (SAP IBP) .................................................. 350 Security ........................................................................ 35 Statement thread limit ...................................... 233
SAP Conversational AI ............ 72, 83, 94, 97, 223 SAP Intelligent Robotic Process Segmentation ............................................................ 42 Stock transport orders ....................................... 310
Self-learning techniques ....................................... 88 Stock-in-transit ..................................................... 309
SAP CoPilot .................................................... 224–225 Automation .......................................................... 70
Semantic colors ..................................................... 259 Store clustering ..................................................... 344
SAP Customer Activity Repository ................ 343 components .......................................................... 72
Service request automation ............................. 362 Store video monitoring ..................................... 352
DDF ........................................................................ 346 SAP Internet of Things .......................................... 76
Service Ticket Intelligence ...................... 362, 385 Strategic purchaser .............................................. 264
product similarity scoring ............................ 347 benefits ................................................................... 77
Side-by-side machine learning .................. 57, 96, Structural risk minimization (SRM) ................ 41
store clustering ................................................. 344 overview ................................................................. 77
102, 273 Subpipelines ........................................................... 210
UDF ........................................................................ 343 process flow .......................................................... 78
ABAP development .......................................... 144 Supplier delivery prediction ............................ 299
SAP Customer Experience .................................... 25 SAP Jam ..................................................................... 379
approach comparison .......................... 119, 121 Supplier invoices .................................................. 298
SAP Data Intelligence ... 25, 50, 57, 96, 103, 161, SAP Leonardo Machine Learning
criteria ..................................................................... 58 Supply chain management .............................. 308
380 Foundation ................................................. 59, 390
data integration ............................................... 169 Switch framework ................................................ 247
approach comparison .................................... 120 SAP Localization Hub .......................................... 378 data protection and privacy ........................ 190 System logs ............................................................. 237
architecture ....................................... 60, 103, 107 SAP Lumira ................................................................ 22 inference process .............................................. 110
benefits .......................................................... 60, 383 SAP Merchandise Planning ............................... 343 prerequisites ....................................................... 110
capabilities ......................................................... 104 SAP Predictive Analytics ...................................... 47 process flow ........................................................... 59
T
components ........................................................... 61 SAP Promotion Management .......................... 343 technical implementation ............................ 137 Target attribute ..................................................... 229
connect to ISLM framework ........................ 147 SAP RealSpend ........................................................ 287 use cases .............................................................. 103
Tax compliance ..................................................... 292
data protection and privacy ........................ 191 SAP S/4HANA .............................................. 13, 25, 33 workload management and
Technical challenges .............................................. 83
deployment ........................................................ 104 architecture .................................................... 83, 95 performance .................................................. 236
Technical implementation ............................... 119
evolution ................................................................ 24 business implementation .............................. 267 Signal analysis ........................................................ 152
ABAP development ......................................... 144
extensibility .............................................. 210, 213 business logic ....................................................... 58 Similarity matching ................................................ 91
APL ......................................................................... 123
GUID ...................................................................... 162 data extraction .................................................. 171 Slow and non-moving stocks ........................... 315
application management processes ........ 155
integration .......................................................... 105 embedded algorithms ....................................... 23 Smart assist ................................................................ 65
approach comparison ................................... 119
integration with SAP S/4HANA .................. 108 embedded analytics .......................................... 33 architecture ........................................................ 114
configuration .................................................... 195
lifecycle management ............................. 58, 156 embedded machine learning .................. 50, 97 consume .............................................................. 116
data integration ............................................... 173
lifecycle phases .................................................. 105 guiding principles ............................................... 94 Smart discovery ................................................ 64, 66
architecture ........................................................ 115 data protection and privacy ....................... 185
modeler ................................................................ 180 integration with SAP Data
benefits .................................................................... 67 embedded machine learning ...................... 122
SAP Cloud Platform ......................................... 382 Intelligence ..................................................... 108
Smart features ................................................. 96, 114 explanation of results .................................... 222
technical implementation ............................ 137 methodology ........................................................ 85
Smart grouping ................................................ 64, 69 extensibility ....................................................... 202
training ................................................................ 107 technical challenges .......................................... 83
Smart insights ................................................... 64, 66 landscape management ............................... 158
upcoming features .......................................... 390 SAP S/4HANA Cloud ............. 21, 25, 69, 210, 282
architecture ........................................................ 114 legal auditing .................................................... 238
workload management and extensibility .............................................. 212, 214
benefits .................................................................... 66 model degradation ......................................... 215
performance .................................................. 236 SAP S/4HANA Retail ............................................. 347
Smart master data quality model validation ............................................. 245
SAP Demand Signal Management ................. 358 SAP S/4HANA Retail for merchandise
improvements .................................................. 355 PAL ......................................................................... 131
SAP Digital Boardroom ................................ 35, 373 management ...................................................... 343
Smart meter data analytics ............................... 352 SAP Analytics Cloud ....................................... 148
SAP Enterprise Consent and Preference SAP S/4HANA Utilities ........................................ 352
Smart pack sizes .................................................... 351 side-by-side machine learning ................... 137
Management ..................................................... 186 SAP Sales Insights for Retail .............................. 346
Smart predict ......................................... 67, 121, 328 side-by-side predictive analytics ............... 148
SAP ERP ......................................................... 22, 39, 47 SAP SportsOne ........................................................ 373
architecture .............................................. 114, 116 user interface ..................................................... 253
SAP Financial Statement Insights .................. 286 SAP Supply Base Optimization ........................ 372
predictive scenarios ........................................... 68 workload management and
SAP Fiori ................................................................... 381 SAP Tax Compliance ............................................ 292
training ................................................................... 68 performance ................................................. 231

406 407
Index

Telecommunications .......................................... 364 U


TensorFlow .... 277–278, 301–302, 304–306, 360
Testing ....................................................................... 245 UI theme designer ................................................ 381
Thing model ............................................................... 78 Unattended automation ...................................... 71
Ticket priority ......................................................... 220 Undeployment ....................................................... 168
Time series .................................................................. 64 Unified demand forecast (UDF) ....................... 343
Time series forecasting ............... 64, 68, 316, 321 Universal Journal ................................................... 285
view chart ............................................................ 152 User interface .......................................................... 252
Time series scenario ............................................ 149 business requirements .................................... 252
Timestamp approach .......................................... 176 explainability ........................................... 223–224
Top 5 influencing factors ................................... 306 model validation .............................................. 251
Trade management .............................................. 357 technical implementation ............................ 253
Trade Promotions Management app ........... 359 User roles .......................................................... 35, 157
Training ............................................ 52, 60, 165, 249 User stories ...................................................... 65, 116
APL-based intelligent scenarios ................. 128 Utilities ...................................................................... 352
coding ................................................................... 141 Utilities Linear Asset Analytics tool ............... 355
data integration ............................................... 170 Utility class .............................................................. 110
data protection and privacy ........................ 187
embedded model ................................................. 98 V
explainability ..................................................... 227
filters ..................................................................... 128 VC dimension ........................................................... 42
lifecycle management .......................... 156, 159 Vendor-initiated payments .............................. 279
logging ................................................................. 241 Virtual data model (VDM) ............................. 52, 97
logic ....................................................................... 135 Volatility ................................................................... 222
model versions .................................................. 129
pipelines ............................................ 108, 112, 141 W
SAP Data Intelligence ........................... 107, 147
scheduling ........................................................... 232 Where-used list ............................................ 203–204
side-by-side predictive analytics ................ 150 Workforce management ...................................... 25
smart predict ........................................................ 68 Workforce planning ............................................. 330
Training data source extension ...................... 201 Workload class ........................................................ 233
technical implementation ............................ 202 Workload management and
Training dataset .................................................... 116 performance ....................................................... 229
Transparency .......................................................... 222 business requirements .................................... 229
embedded machine learning ....................... 231
side-by-side machine learning .................... 236
technical implementation ............................ 231

408
First-hand knowledge.

Dr. Siar Sarferaz is a chief software architect at SAP. In this role


he drives digital transformation by focusing on artificial intelli-
gence and predictive analytics. He began his career as a method
researcher at Siemens AG, before moving to SAP, where he has
now worked for more than 20 years, holding various positions. He
is the lead architect for machine learning implementation in SAP S/4HANA and
is in charge of all concepts for infusing intelligence into business processes.
He studied computer science and philosophy and holds a Ph.D. in computer
science.
Raghu Banda is a senior director of AI product strategy at SAP
Labs, where he is responsible for infusing AI technologies in SAP
S/4HANA. He began his career as a software developer and
architect in India before moving to the US in 1997. He joined with
SAP in 2001 and worked in various roles such as engineering de-
velopment, customer support and implementations, product marketing, and
product management. He has worked with predictive analytics and machine
learning since SAP entered this arena in 2012. He holds a Bachelor of Science
in computer science and engineering and will soon graduate from the presti-
gious INSEAD business school. He is the lead product manager for leveraging
machine learning into SAP S/4HANA.

Siar Sarferaz, Raghu Banda


Implementing Machine Learning with SAP
S/4HANA
408 Pages, 2020, $89.95 We hope you have enjoyed this reading sample. You may recommend
ISBN 978-1-4932-2011-3 or pass it on to others, but only in its entirety, including all pages. This
reading sample and all its parts are protected by copyright law. All usa-
www.sap-press.com/5158 ge and exploitation rights are reserved by the author and the publisher.

You might also like