ABAP Cloud & ABAP RESTful Application
Programming Model (RAP)
Overview
ABAP Platform Product Management, SAP
May 2023
PUBLIC
Agenda
INTRODUCTION
BIG PICTURE
BUSINESS OBJECTS
BUSINESS SERVICES
SUMMARY
Public 2
INTRODUCTION
Clean core with the ABAP cloud development model
… is the ABAP development model to build cloud-ready business apps, services and extensions
… comes with SAP Business Technology Platform (BTP) and SAP S/4HANA
… works with public or private cloud, and even on-premise
Public 4
The evolution to ABAP Cloud
(Steampunk) (Embedded Steampunk)
2012 2015 2018 09/10.2022
ABAP Development ABAP supports Cloud-ready Cloud-ready
ABAP objects, Tools in Eclipse • SAP HANA ABAP extensions ABAP extensions
ABAP unit, (ADT) • SAP Fiori on SAP BTP on SAP S/4HANA
The internet, • Cloud
Internal tables w/o header line ;) ABAP RESTful Application
• Key user extensibility
Programming Model (RAP)
ABAP Cloud
Public * SAP Business Technology Platform 5
ABAP Cloud at a glance
BUSINESS UI SERVICES INTEGRATION SERVICES
Output Management, Jobs, SAP BTP Workflow, XCO,...
Git based code management with gCTS and abapGit
SERVICE OData and InA OData, Events, HTTP, RFC, SQL
for SAP FIORI and analytical clients for application and data integration
REUSE SERVICES AND LIBRARIES
EXPOSURE
Cloud-readiness, IAM3, BC4, extensibility,...
ADT5, BAS6, Key User & Monitoring Tools
LIFECYCLE MANAGEMENT
BUILT-IN QUALITIES
DOMAIN-SPECIFIC MODELS
CDS1 entity, RAP2 Business Object, CDS analytical provider
TOOLS
DOMAIN-SPECIFIC
IMPLEMENTATION
DOMAIN-SPECIFIC LOGIC
ABAP, CDS
BUSINESS INTEGRATION SERVICES
DATABASE SAP HANA SERVICE OData, SOAP, Events, HTTP,
SQL and SQLScript CONSUMPTION RFC for application integration
1 Core Data Services 3 Identity
Public & Access Management 5 ABAP Development Tools 6
2 ABAP RESTful application programming model 4 Business Configuration 6 Business Application Studio
Availability of ABAP Cloud
ABAP CLOUD ABAP CLOUD
DEVELOPMENT DEVELOPMENT
SAP
ON SAP S/4HANA ON SAP BTP
S/4HANA
public interfaces
(CLOUD)
remote API
public interfaces public interfaces
SAP S/4HANA CLOUD ABAP SAP BUSINESS TECHNOLOGY PLATFORM
ENVIRONMENT / ABAP PLATFORM ABAP ENVIRONMENT
ABAP CLOUD IS AVAILABLE IN THE FOLLOWING PRODUCTS
PRODUCT RELEASE ABAP CLOUD USAGE
SAP BTP ABAP Environment All Mandatory
SAP S/4HANA Cloud, public edition ≥ 2208 (new customers) Mandatory
SAP S/4HANA Cloud, private edition and
≥ 2022 Recommended *
SAP S/4HANA on-premise
Public
* Classic ABAP can still be used 7
Evolution of the ABAP programming model
ABAP PLATFORM ≤ 7.5 ABAP PLATFORM ≥ 7.5 SAP BTP
ABAP ENVIRONMENT
SAP S/4HANA ≥ 1909
CLASSIC ABAP ABAP PROGRAMMING ABAP RESTful
PROGRAMMING MODEL FOR APPLICATION
SAP FIORI PROGRAMMING
MODEL (RAP)
Best practice freestyle ABAP CDS, CDS-based BOPF, CDS, Behavior Definition &
programming, (Web) Dynpro, SEGW / @OData annotation Implementation, Business
CDS1 with Referenced Data Source Services
1 starting with release 7.4 SPS05
Public 8
ABAP RESTful Application Programming Model (RAP) at a glance
The centerpiece of ABAP Cloud for building transactional apps
UI services for SAP Fiori apps
RAP – FOR EFFICIENT ENTERPRISE
Web APIs
GRADE APPLICATION DEVELOPMENT
Events
CONCEPTS SERVICE DEVELOPMENT
TOOLS
Greenfield development
FRAMEWORKS Brownfield development
LANGUAGES UNIVERSALLY USABLE PROGRAMMING MODEL
BEST PRACTISES SAP BTP ABAP Environment
SAP S/4HANA, cloud and on-premise editions
AVAILABLE IN THE CLOUD AND ON-PREM
Public 9
The key players
ABAP Development Tools in Eclipse for all development tasks
Easy developer onboarding
End-to-end development flow
Languages: ABAP and Core Data Services (CDS)
Standard implementation tasks via typed APIs supporting
static code checks, auto-completion, element info
Powerful frameworks
Take over technical implementation tasks
Business logic added in code exits on protocol-agnostic layers
Public 10
Efficient ABAP development in Eclipse©
HIGH DEVELOPER PRODUCTIVITY WITH THE
ABAP DEVELOPMENT TOOLS (ADT)
ON-PREMISE AND IN THE CLOUD
MODERN DEVELOPMENT TOOLSET
Fully eclipse-based
Syntax check, Code completion
Navigation, Search, Quick Fixes
Full support for the ABAP RESTful
Application Programming Model and CDS
QUALITY ASSURANCE
Static code checks (ATC, CVA) with
remote and local scenarios
Unit testing incl. isolation frameworks
Test seams and injections
SUPPORTABILITY
Debugging, profiling, tracing
Static and dynamic logging
Runtime monitoring and analysis
Public 11
Next generation data modeling and access with ABAP CDS – Example
View annotations
View definition Data source
Associations
Element annotations
Selection
ABAP Flight Reference Scenario -
Example available in package /DMO/FLIGHT_DRAFT
Public 13
Entity Manipulation Language (EML) – At a glance
EXAMPLES
Extension of the ABAP Language
with SQL-like syntax
Used to control the transactional
behavior of RAP business objects (BOs)
Provides API-based access to RAP BOs,
even outside of the RAP context
API reference available in the ABAP
keyword documentation (link)
Public 15
BIG PICTURE
RAP – The big picture
WEB APIs EVENTS SAP FIORI UIs
Consume OData based services Consume business events Consume OData based UI
CONSUMPTION services
SERVICE BINDING – Bind to protocol version and scenario
SERVICE DEFINITION – Define scope to be exposed
BUSINESS OBJECT PROJECTIONS AND INTERFACES
CDS: BO projection views
BDEF: Behavior projection
EXTENSIBILITY
BUSINESS ABAP: Behavior implementation 1
SERVICE
EXPOSURE
CDS ENTITIES BUSINESS OBJECTS
CDS: Data modeling CDS: Data modeling
BDEF: Behavior definition
DATA MODELING ABAP: Behavior implementation
& BEHAVIOR
1 Not applicable for RAP BO interfaces
Public 17
BUSINESS OBJECTS
What is a business object (BO) ?
Behaviour
CRUD, Actions, Functions
Locks, eTag, Authorizations,
Feature Control, Draft
Data Model
R
2
COMPOSITION 1 3
TREE Runtime Implementation
(root, parent and child nodes)
INTERACTION PHASE
TX buffer
SAVE SEQUENCE
Public 20
BO runtime implementation types
INTERACTION SAVE
PHASE SEQUENCE UNMANAGED
For brownfield developments with available application code for
finalize interaction phase, transactional buffer, and save sequence
Developers in charge of BO runtime: CRUD operations
check_before_save
Adapters needed to integrate the existing code
MODIFY
adjust_numbers
READ
LOCK
save
MANAGED
For greenfield developments with standard implementation
(opt. unmanaged appl. components: DB tables, lock/PFCG object, update task FM)
Transactional
buffer Standard CRUD operations work out of the box
SAP HANA Developers add BO-specific business logic
BUSINESS OBJECT (BO) RUNTIME
Public 21
BUSINESS SERVICES
Business service
Web API Lifecycle
Service Binding
Release
Protocol: OData V2, OData V4, …
Versioning
Scenario: Web API or UI?
Deprecation
2
3
1 Tool support
4 UI: SAP Fiori Elements preview
Web API: Swagger UI preview*
Service Definition: which entities? R
* planned
BO Projection View: which elements?
Behavior Projection: which behavior?
Public 27
The development flow
DEFINE ROLES
Role
SERVICE
BINDING PREVIEW
BIND TO SCENARIO
AND PROTOCOL
SERVICE
AUNIT DEFINITION
Scenario and integration test
DEFINE SCOPE
ADD
BEHAVIOR
AUNIT
Unit test
DATA MODEL BEHAVIOR
PROJECTION PROJECTION
PROJECT ELEMENTS AND ENRICH PROJECT BEHAVIOR
ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE
AUTHORITY-CHECK
APPLICATION DATA
DATABASE TABLES Lock object
Public 28
SUMMARY
Key takeaways
The ABAP RESTful Application Programming Model (RAP)
helps you efficiently and rapidly build enterprise-grade services
with built-in cloud qualities.
RAP best support SAP HANA and SAP Fiori elements.
RAP is available on SAP BTP ABAP Environment, SAP S/4HANA
Cloud, and SAP S/4HANA as of edition 1909.
The RAP feature scope is enhanced quarterly in SAP BTP
ABAP Environment, twice a year in SAP S/4HANA Cloud
ABAP Environment, and annually in SAP S/4HANA.
What’s New: SAP BTP ABAP environment | SAP S/4HANA | SAP S/4HANA Cloud
What’s Next: ABAP Platform Roadmap Information for all products
Public 46
More information on RAP
Further information
Modern ABAP Development with the ABAP RESTful Application Programming Model (RAP) | SAP Community
Modernization with RAP | SAP Blogs
Building Apps with RAP | openSAP Course
Acquire Core ABAP Skills | SAP Learning Journey
What’s New in RAP: SAP BTP ABAP Environment | SAP S/4HANA | SAP S/4HANA Cloud
Outlook: SAP BTP ABAP Environment on the interactive SAP Road Map Explorer | ABAP Platform Roadmap Information
Public SAP Web sites
ABAP Development Community: [Link]/community/topic/[Link]
SAP BTP ABAP Environment Community: [Link]
SAP S/4HANA Cloud ABAP Environment Community: [Link]
ABAP Testing and Analysis Community: [Link]
SAP products: [Link]/products
SAP training and certification opportunities
[Link]/education – e.g. trainings S4D437, S4D430, HA400, and S4D400
[Link]/learning-journey – e.g., search for ABAP
Public 51
Exercises
[Link]
exercises-codejam
Thank you.
Contact information:
Rich Heilman
Developer Advocacy
SAP
[Link]@[Link]
© 2023 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on [Link]/legal-notice for use terms, disclaimers, disclosures, or restrictions related to SAP Materials for general audiences.