You are on page 1of 27

Overview of the ABAP RESTful Programming Model

in SAP Cloud Platform ABAP Environment


Product Management Technology Platform, SAP
2019

PUBLIC
Legal disclaimer

The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission o f SAP.
This presentation is not subject to your license agreement or any other service or subscription agreement with SAP. SAP has n o obligation
to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned
therein. This document, or any related presentation, and SAP’s strategy and possible future developments, products, and platf orms, directions,
and functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The information in this
document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. This document is provided without
a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fi tness for a particular
purpose, or noninfringement. This document is for informational purposes and may not be incorporated into a contract. SAP assumes no
responsibility for errors or omissions in this document, except if such damages were caused by SAP’s willful misconduct or gr oss negligence.

All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ material ly from
expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates,
and they should not be relied upon in making purchasing decisions.

For all recent and planned innovations, potential data protection and privacy features include simplified deletion of persona l data, reporting
of personal data to an identified data subject, restricted access to personal data, masking of personal data, read access log ging to special
categories of personal data, change logging of personal data, and consent management mechanisms.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Objectives

After completing this learning module, you will be able to:

Understand the mission of the ABAP RESTful Programming Model


Understand how the new programming model improves developers live
Understand the meaning of business objects and business services

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Programming Model: The Mission

… for the development of


SAP Fiori apps and
PROVIDE A PROGRAMMING MODEL …
Cloud APIs / A2X services…

… for customers and partners in SAP S/4HANA … supporting the product qualities
… for SAP internal development in SAP S/4HANA User experience: SAP Fiori and SAP HANA
… for customers and partners in Cloud: scalability
SAP Cloud Platform ABAP Environment ABAP assets: non-functional requirements

… offering an end-to-end experience


… and being flexible
standardized development flow
Break-outs for non-standardized implementations
best practices & development guides
Out-of-the-box extensibility & verticalization
high development efficiency
Reuse components / APIs in “freestyle” development
focus on business logic, rather than technical
scenarios
aspects

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Agenda

The ABAP RESTful Programming Model


Why and what?

Business Objects
Definition, Demo, Roadmap

Business Services
Definition, Demo, Roadmap

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


The ABAP RESTful Programming Model
Why and what?
Improvement of the ABAP Programming Model
Integration of existing code and Development Efficiency

EXISTING EXISTING
TECHNOLOGIES APPLICATION CODE

Integration of existing code


Service enablement
End-2-end development
experience
ADT only tools
Intuitive development flow
Extensibility and verticalization Native CDS and ABAP language support
out-of-the-box No code generation
Only typed APIs for main implementation tasks
Business Objects as ABAP first class citizens

ABAP RESTful PROGRAMMING MODEL

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Guiding Principles
ABAP RESTful Programming Model

All standard development tasks…


... are based on ABAP Development Tools in Eclipse
… with an end-to-end development experience
… with native CDS / ABAP language support (for 80% use cases)
Typed signatures
Static code checks
Auto-completion, Element Info…

There is
… NO use of generic framework APIs
… NO code generation
… NO redundancy in transport-objects
Improved lifecycle (transport, patches,…)
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8
ABAP RESTful Programming Model

SERVICE SAP Fiori UI A2X


CONSUMPTION Consume OData UI services Consume OData A2X services

SERVICE BINDING
BUSINESS Bind the service to OData protocol
SERVICES
PROVISIONING SERVICE DEFINITION
Define scope to be exposed

BUSINESS OBJECTS QUERIES

Data modelling with CDS


DATA MODELLING & Data modelling with CDS
Behaviour Definition
BEHAVIOUR

Behaviour implementation

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


ABAP RESTful Programming Model
Business Services

Entry-point of service implementation


SERVICE BINDING
Expose service protocol specifically
Test / Preview tools

SERVICE Service definition via projection of data and


DEFINITION behaviour

DATA & BEHAVIOUR Universe of Business Objects & analytical


DEFINITION data models and their related business
logic

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


ABAP RESTful Programming Model
Business Services
… … Clear dev flow
MAINT_SERVICE SERVICE BINDING
Service entry-point
Viewer
SERVICE BINDING OData V4 Service Overview of related artefacts
Classic SAP GUI transactions ICF: active Eclipse based
Role: not assigned
No clear entry point / dev flow development
OAuth: …
Navigation to service model
NON CDS

CDS
SEGW - RDS SERVICE DEFINITION
Clear responsibilities
SERVICE
Code generation Eclipse based development
DEFINITION REF TO NON CDS Viewer
No generation of artefacts
CDS
CDS
consumption
views

No domain specific support MDE MDE MDE MDE

today future

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


ABAP RESTful Programming Model
Business Objects
CDS data model CDS data model
Business
object viewer
@composition

generate reference
BDL
Behaviour for BO in ABAP
BOPF business object implemented
Outline

Clear development flow


(CDS for data modelling with ABAP language extensions for
behaviour)
Development flow not intuitive No redundancy and no generation of artefacts
(CDS and BOPF tooling) (clear references on language level)
DATA & BEHAVIOUR Generation of artefacts Typed APIs
DEFINITION (BOPF metadata generation based on (For BO consumer and provider)
CDS artefacts) ➔ The Business Object becomes an ABAP first class citizen
Untyped signature (Known by ABAP compiler, language and tools including static
(BOPF consumer and provider API) checks)

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC today future 12
ABAP RESTful Programming Model
Big Picture
SERVICE BINDING
Service Fiori Elements Preview
viewer
SERVICE BINDING
PROTOCOL SPECIFIC

SERVICE DEFINITION PROTOCOL AGNOSTIC

Service Service model CDS editor: Projection views


Definition
viewer
SERVICE
DEFINITION

MDE MDE MDE MDE MDE MDE MDE MDE

BUSINESS OBJECT
Business CDS editor: CDS entities Class editor BO Test-shell
object
DATA & BEHAVIOUR viewer View
DEFINITION entity
Table action,
entity determination,
ABAP validation
entity

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


BUSINESS OBJECTS
What is a Business Object (BO)?
BO BEHAVIOUR
CUD,
Actions,
Functions,
Locks,
eTag,
BO STRUCTURE Authorizations,
Feature Control,
Draft
R
2

ROOT
1 3
COMPOSITION BO RUNTIME

INTERACTION PHASE

TX buffer

SAVE SEQUENCE

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Business Object Runtime

BUSINESS
OBJECT
INTERACTION PHASE SAVE SEQUENCE RUNTIME

MODIFY READ LOCK

finalize

create_by_association

read_by_association
check_before_save

execute_function
execute_action adjust_numbers
update

save
create

delete

read

lock
TX buffer

SAP HANA

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


Business Objects – Status Overview

INTERACTION SAVE
PHASE SEQUENCE UNMANAGED

finalize
1 Application coding available
(e.g. Purchase Order, Sales Order,…)

check_before_save
MODIFY

adjust_numbers MANAGED
2
READ

LOCK

Green field development


save

(MANAGED WITH) SAVE SELF-IMPLEMENTED


TX buffer 3 Update task function module available
(e.g. Business Partner, Product,..)
SAP HANA

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


Business Objects - Unmanaged

INTERACTION SAVE
PHASE SEQUENCE
Application coding
finalize
already available
checkBeforeSave
for interaction phase, transactional buffer and save sequence
MODIFY

adjustNumbers decoupled from UI technology


READ

LOCK

save

APPLICATION CODE
Examples
TX Buffer Sales Order, Purchase Order

Adapter

SAP HANA
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18
Business Objects – Managed

INTERACTION SAVE
PHASE SEQUENCE

Application coding
finalize
not yet available or fine granular reusable code available
checkBeforeSave
technical implementation aspects taken over by BO
infrastructure
MODIFY

adjustNumbers
READ

LOCK

developer focus on business logic, implemented via


save
determinations, validation, actions,…

MANAGED RUNTIME
Examples
TX Buffer New applications in SAP Cloud Platform ABAP Environment

Business Logic via


determinations, validations
SAP HANA

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19


Business Objects – Save Unmanaged

INTERACTION SAVE
PHASE SEQUENCE
Application coding
finalize
“update-task function module” available
checkBeforeSave
coding for interaction phase not available
(e.g. highly coupled in older UI technology: DYNP - PBO / PAI)
MODIFY

adjustNumbers
READ

LOCK

technical implementation aspects to be taken over by BO infrastructure


save

Examples
MANAGED RUNTIME
Function module Business Partner, Product
for UPDATE
TX Buffer TASK
SAP HANA

Application code in
determinations / validations / …
SAP HANA

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


Business Objects - Roadmap

1 ADT development experience: Business Object onboarding

2 Support for managed BO runtime (with unmanaged save)

3 Business Object Access API

4 Draft, feature control (incl. authorizations)

5 Role-specific service projections

6 Support for managed BO runtime: determinations and validations

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21


BUSINESS SERVICES
ABAP RESTful Programming Model

SERVICE SAP Fiori UI A2X


CONSUMPTION Consume OData UI services Consume OData A2X services

SERVICE BINDING
BUSINESS Bind the service to OData protocol
SERVICES
PROVISIONING SERVICE DEFINITION
Define scope to be exposed

BUSINESS OBJECTS QUERIES

Data modelling with CDS


DATA MODELLING & Data modelling with CDS
Behaviour Definition
BEHAVIOUR

Behaviour implementation

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23


Business Services Big Picture– Runtime stack

SAP FIORI SAP FIORI

SAP CLOUD SAP S/4HANA


GATEWAY GATEWAY
PLATFORM CLOUD
ABAP
ENVIRONMENT
SADL SADL

BO Runtime Query BO Runtime Query

MANAGED UNMANAGED MANAGED UNMANAGED A2X UNMANAGED MANAGED


APPL CODE OPEN SQL APPL CODE
MANAGED
APPL CODE OPEN SQL

SAP HANA SAP HANA

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 24


Business Services Big Picture– Design Time stack

ABAP
A2X UI Value help
A2X
A2X A2X
A2X PLATFORM
SERVICE SERVICE UI annotations Release / Whitelisting
SERVICE
SERVICE SERVICE
SERVICE Feature control Versioning
Compatibility check
expose OData V2 / V4
BUSINESS
SERVICE DEFINITION
SERVICE
SERVICES SERVICE MODEL
MODELDEFINITION
DEFINITION
Sort
Filter
Text search
project project
DATA & BOs Queries
BEHAVIOUR BOs
BOs BOs
BOs
Model Behaviour Runtime Model/ Behaviour Runtime
Model
Model Behaviour
Behaviour Runtime
Runtime Model
Model Behaviour
Behaviour Runtime
Runtime
Structure
Managed: SQL
Custom: ABAP queries

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 25


Business Services - Roadmap

1 A2X OData V4 outbound services

2 Versioning, release and compatibility check for A2X OData V2 and OData V4

3 Inbound services for A2X consumption of OData V2 and OData V4

4 SAP Fiori UI OData V4 services

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 26


Thank you.
Contact information:
Product Management Technology Platform, SAP

You might also like