0% found this document useful (0 votes)
237 views

CNA215 - See The Big Picture of The ABAP RESTful Programming Model

See the Big Picture of the ABAP RESTful Programming Model

Uploaded by

aayush dhawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
237 views

CNA215 - See The Big Picture of The ABAP RESTful Programming Model

See the Big Picture of the ABAP RESTful Programming Model

Uploaded by

aayush dhawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

SAP CLOUD PLATFORM

ABAP ENVIRONMENT

ABAP

SAP HANA

CNA215 – See the Big Picture of the


ABAP RESTful Programming Model

PUBLIC
Speakers 2018

SAP TechEd Las Vegas Marcel Hermanns


October 2–5, 2018

SAP TechEd Barcelona Marcel Hermanns


October 23–25, 2018

SAP TechEd Bangalore Gopalakrishnan Ramachandran


November 28–30, 2018

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


Take the session survey.
We want to hear from you!

Be sure to complete the session evaluation


for this session CNA215 on the SAP TechEd
mobile app.

Download the app from


iPhone App Store or Google Play.

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


Disclaimer

The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission of SAP.
Except for your obligation to protect confidential information, this presentation is not subject to your license agreement or any other service
or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or any related
document, or to develop or release any functionality mentioned therein.
This presentation, or any related document and SAP's strategy and possible future developments, products and or platforms 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
presentation is not a commitment, promise or legal obligation to deliver any material, code or functionality. This presentation is provided
without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. This presentation is for informational purposes and may not be incorporated into a contract. SAP
assumes no responsibility for errors or omissions in this presentation, except if such damages were caused by SAP’s intentional or gross
negligence.
All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially 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.

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


ABAP Strategy

CNA120
CNA215

Optimize Your Custom ABAP Code


for SAP HANA

CNA319
See the Big Picture of the ABAP
RESTful
Programming Model
CNA215

A Technical Deep Dive into the


ABAP RESTful
Programming Model
CNA216

1 hour lecture
Automated Testing with the ABAP
RESTful Programming Model
CNA317

Custom Code Adaptation for


SAP S/4HANA
CNA302

2 hours hands-on workshop

Build a List Report App with SAP


Fiori and ABAP Programming Model
CNA381

Build a Transactional SAP Fiori App


with the ABAP Programming Model
CNA379
Optimize Your Custom ABAP Code for SAP HANA

1 hour codejam

Custom Code Adaptation for SAP


S/4HANA
CNA364

Build an SAP Fiori App with the


HOW TO MOVE YOUR ABAP SKILLS TO THE CLOUD AND SAP HANA

ABAP Programming Model


CNA654

Troubleshoot Your SAP Fiori App


with ABAP Development Tools for
Eclipse
CNA653
Evolution of the ABAP programming model
ABAP Platform ≤ 7.5 ABAP Platform ≥ 7.51 SAP Cloud Platform ABAP Environment ≥ 1808 *

CLASSIC ABAP ABAP PROGRAMMING MODEL ABAP RESTful


PROGRAMMING FOR SAP FIORI PROGRAMMING MODEL

SEGW @OData Business Service


Reference Data Source
Best practice freestyle
ABAP programming
Core Data CDS based Core Data
Beaviour Definition
Services BOPF Services

Currently best practice


Dos and Don’ts Future direction
Hands-on session CNA381
Be prepared for the new This session today
Recording from TechEd 2017
programming model Documentation
Documentation

Save investments! Integration planned for 2020

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC * On-premise planned for later releases 6
Programming model: The mission

… for the development of


SAP Fiori apps and PROVIDE A PROGRAMMING MODEL …
Cloud APIs / A2X services
Other scenarios in ecosystem
(e.g. Cloud Migration Cockpit, …)

… offering an end-to-end experience


… for customers and partners in SAP S/4HANA Tools: standardized development flow
… for SAP internal development in SAP S/4HANA Languages: CDS and ABAP
… for customers and partners in Frameworks for optimized development efficiency
SAP Cloud Platform ABAP Environment Documentation: best practices & development guides

… supporting the product qualities … and being flexible


User experience: SAP Fiori and SAP HANA Out-of-the-box extensibility & verticalization
Cloud: scalability Break-outs for non-standardized implementations
ABAP assets: non-functional DONE CRITERIA Reuse in “freestyle” development scenarios

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


The golden rules

ABAP Development Tools in Eclipse for all development tasks


Developer on-boarding
End-to-end development flow

Language: ABAP and CDS


Standard implementation tasks via typed APIs supporting
Auto-completion, element info, static code checks

Frameworks
Take over technical implementation tasks
Business logic added in code exits on protocol agnostic layers

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


ABAP Development: Must learn topics

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 modeling with CDS


DATA MODELING & Data modeling with CDS
Behavior definition
BEHAVIOR

Behaviour implementation

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


Agenda

What is a Business Object?

What is a Business Service?

The Big Picture

Optional: OData Consumption

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


WHAT IS A
BUSINESS OBJECT?
What is a business object (BO)?
BO BEHAVIOUR
CUD,
Actions,
Functions,
Locks,
eTag,
BO STRUCTURE Authorizations,
Feature Control,
R
2 Draft

ROOT
1 3
COMPOSITION BO RUNTIME

INTERACTION PHASE

TX buffer

SAVE SEQUENCE

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


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

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


Business objects - status overview

INTERACTION SAVE
PHASE SEQUENCE UNMANAGED

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

check_before_save

MANAGED
MODIFY

adjust_numbers
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

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


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
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15
Business objects - managed

INTERACTION SAVE
PHASE SEQUENCE

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

adjustNumbers
developer focus on business logic, implemented via code exits:
READ

LOCK

determinations, validation, actions,…


save

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

Business Logic via


determinations, validations
SAP HANA

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


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

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


Standard operations - Create, Update, Delete
BO access API can be called (EML)

Define behavior of…


{ create; update; delete; }

UI reflecting behaviour definition

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Specific operations - (static) actions
Define behavior of… BO access API can be called (EML)
{ action … }

UI reflecting definition of specific operations


MDE: expose action

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


Locks and eTag
Exclusive lock for transactional changes (based on enqueue locks), e.g. in draft UI interaction

BDEF: Lock-master Error message - e.g. in UI (locks)

Travel-ID is already locked by another user

Optimistic lock (e.g. via timestamp comparison), e.g. in A2X services

BDEF: eTag Error message - e.g. in A2X (eTag)

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


Demo

BO modeling and implementation

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


Next steps planned

Authorizations for CUD via DCL

Feature control

Draft handling

Managed BOs: Determinations and Validations

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 22


WHAT IS A
BUSINESS SERVICE?
What is a business service?

Lifecycle
Protocol and use case
Release

OData V2, V4 Versioning

A2X or (SAP Fiori) UI Deprecation

…?

2
3

Service Model 1
R
4 Tool support
UI: SAP Fiori Elements preview
A2X: Documentation preview

Entities to be exposed

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


SAP Fiori UI and A2X services

A2X SAP FIORI UI

UI annotation exposure Not required Required

Not required Required


Value help
(but replicated code lists) (for UI end-user interaction)

Dynamic feature control Not required Required

Draft Not required Required

ContentIDs for complex


Required Not required
$batch requests

Release, versioning and


Required Not required
deprecation

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


Release and versioning of A2X services

SD creates A2X service V1

SD releases A2X service


Serv mySO M binding for V1

Model Behaviour SD sets A2X service V1 to


CUD deprecated
Actions
SD implements BO SalesOrder I
V1 R C
BO SalesOrder A2X
Model Behaviour Runtime Serv mySOV2 OData V2, V4,
(SOA) R
CUD managed V2
SD changes BO Actions Model Behaviour
XOR
SalesOrder Locks
CUD
incompatible eTag unmanaged
Actions SD creates improved A2X
Draft
service V2

SD releases A2X service


SERVICE binding for V2
SERVICE DEFINITION BINDING
DATA & BEHAVIOUR BUSINESS SERVICE

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


Demo

Expose Business Object


as UI service for SAP Fiori
with SAP Fiori Elements Preview

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 27


THE BIG PICTURE
ABAP RESTful programming model: Big Picture

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 modeling with CDS

DATA MODELING & Data modeling with CDS


Behavior definition
BEHAVIOR
Behaviour implementation

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 29


ABAP RESTful Programming Model: Development Flow

DEFINE ROLES
Role
SERVICE
BINDING PREVIEW

DEFINE SCENARIO
& PROTOCOL

AUNIT AUNIT
Scenario & integration test Unit test
SERVICE
DEFINITION

DEFINE
SCOPE

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object DCL
QUERY
DATA ACCESS CDS BASED CDS BEHAVIOR ABAP CODE
CONROL DATA MODELL DEFINITION
AUTHORITY-CHECK

Lock object

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 30


Develop SAP HANA optimized SAP Fiori apps

Freestyle or templates based UI development


SAPUI5
SAPUI5 / SAP Fiori Elements

OData protocol infrastructure OData


SAP Gateway

SAP Gateway
One common data modelling technology for all scenarios
Core Data Services (CDS)
ABAP Application Core Data
Development Frameworks Services
Transaction, error and event handling services
CDS behavior (BDEF)
SAP NetWeaver
Effective and efficient application development
Modern ABAP language and development tools SQL

Exploit SAP HANA features and performance


SAP HANA
AMDP and CDS Table Functions

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 31


ODATA CONSUMPTION
What is required for a consumption scenario?

Service Proxy API

For OData V2,V4


Service
Consumption Based on service
consumption model
Model
R
2

Local representation 1 3
of the external model Integration into apps
CDS artifacts not SQL-
managed

Data (partly) fetched from


remote

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 33


Business services big picture - SAP CP ABAP ENVIRONMENT
SAP S/4HANA customer:
Bring custom solution into the cloud
as Fiori app and A2X service
Solution:
Use SAP’s business partner and custom tables,
BUSINESS
business logic already available
SERVICE
SAP UI, A2X, …
CLOUD [Consume via OData Client Proxy]
PLATFORM
Access remotely SAP’s Business Partner in my S/4HANA cloud
ABAP
instance
ENVIRONMENT
UNMANAGED [Custom Query]
Business Service
QUERY Transform BuPa and local data via custom code
BUSINESS
CRUDE QUERY Service-enable custom code via custom query, fulfilling default Fiori
OBJECT OData requests (sorting, filtering and paging)
Service enabling V2 / V4 SAP
(unmanaged) FM FM BuPa S/4HANA
CLOUD [Business Object – Service Enablement]
Handle modifications of local (and BuPa) data in my custom code
Service-enable custom code via business objects

ODATA CLIENT
PROXY [Business Services – A2X / UI]
Expose data to Fiori UI and A2X service
Custom

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 34


SAP TechEd online / SAP Community

Access replays of:


§ Keynotes
§ SAP TechEd live interviews
§ Selected lecture sessions

http://sapteched.com/online

Continue your SAP TechEd discussion after


the event within SAP Community:
§ Read and reply to blog posts
§ Ask your questions
§ Join conversations

sap.com/community
See all SAP TechEd blog posts

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 35


Further information

Related SAP TechEd learning journeys


CNA6 – How to Move Your ABAP Skills to the Cloud and SAP HANA
CNA4 – How to get to SAP S/4HANA

Related SAP TechEd sessions


CNA120 – ABAP Strategy
CNA216 – A Technical deep dive into the ABAP RESTful Programming Model
CNA317 – Automated Testing with the ABAP RESTful Programming Model
CNA319 – Optimize your Custom ABAP Code for SAP HANA
CNA379 – Build a transactional SAP Fiori App with the ABAP Programming Model
CNA381 – Build a List Report App with SAP Fiori and the ABAP Programming Model
CNA654 – Build a SAP Fiori App with the ABAP Programming Model
CNA653 – Troubleshoot Your SAP Fiori App with ABAP Development Tools for Eclipse

Public SAP Web sites


ABAP Development Community: https://www.sap.com/community/topic/abap.html
SAP products: www.sap.com/products

SAP training and certification opportunities


www.sap.com/education

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 36


Thanks for attending this session.

Das Bild kann derzeit nicht angezeigt werden.

Feedback Contact for further topic inquiries

Please complete your session Marcel Hermanns


[email protected]
evaluation for CNA215.

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 37


Follow us

www.sap.com/contactsap

© 2018 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no 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 SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies 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. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.

You might also like