ABAP RESTful Application Programming Model (RAP) - Overview
ABAP RESTful Application Programming Model (RAP) - Overview
INTRODUCTION
BIG PICTURE
MAJOR CONCEPTS
SUMMARY
➢
➢
➢
➢
ABAP Cloud
DEVELOPMENT
MODEL
ABAP Cloud
INTEGRATION TOOLS
BUILT-IN QUALITIES
(OData and InA1)
TOOLS
DOMAIN-SPECIFIC MODELS
CDS2 entity, RAP3 Business Object, CDS analytical provider
DOMAIN-SPECIFIC
IMPLEMENTATION
BAS7,
DOMAIN-SPECIFIC LOGIC
ADT6,
ABAP, CDS
1 Information access 3 ABAP RESTful application programming model 5 Business Configuration 7 Business Application Studio
INTERNAL – SAP and Partners Only
Public 7
2 Core Data Services 4 Identity& Access Management 6 ABAP Development Tools
ABAP Cloud – IDE and API examples for on-stack developer extensibility
Custom ABAP on
SAP S/4HANA Cloud
ABAP development tools in Eclipse
Cloud-optimized ABAP language
Proven ABAP transport management
SAP S/4HANA SAP S/4HANA Cloud SAP S/4HANA Cloud SAP BTP,
any premise 1 Private Edition 1 Public Edition 2 ABAP Environment
1 SAP S/4HANA any premise or SAP S/4HANA Cloud Private Edition release ≥ 2022
2 SAP S/4HANA Cloud Public Edition release ≥ 2208, 3-system landscape required
POWERFUL FRAMEWORKS
Take over technical implementation tasks
Business logic added in code exits on protocol-agnostic layers
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
Advanced table operations such as CORRESPONDING( ) Inline code documentation with ABAP Doc, Development
operator, grouping, and filtering object documentation with knowledge transfer objects
Semantically rich
Declarative
ABAP
Close to conceptual thinking
DATA
Rich set of built-in functions
Code pushdown capabilities
Declarative access control
Advanced view building – External implementation CDS Custom Entity DEFINE CUSTOM ENTITY
CDS Abstract Entity DEFINE ABSTRACT ENTITY
Advanced view building – SAP HANA breakout CDS Table Function DEFINE TABLE FUNCTION
CDS Hierarchy DEFINE HIERARCHY
2
CDS Scalar Function DEFINE SCALAR FUNCTION
2
Type definition CDS Simple Type DEFINE SIMPLE TYPE
2
CDS Enumerated Type DEFINE TYPE ENUM
Transactional behavior definition of business objects built CDS Behavior Definition (and Projection) DEFINE BEHAVIOR
with the ABAP RESTful Application Programming Model
Associations
Element annotations
Selection
Safe investments!
TOOLS
Greenfield development
DOMAIN-SPECIFIC MODELS
CDS1 entity, RAP2 Business Object
DOMAIN-SPECIFIC
IMPLEMENTATION
DOMAIN-SPECIFIC LOGIC
ABAP, CDS
BUSINESS OBJECT
INTERACTION SAVE
UNMANAGED
PHASE SEQUENCE
For brownfield developments with available application code for
interaction phase, transactional buffer, and save sequence
finalize
➔ Developers in charge of BO runtime: CRUD operations
check_before_save ➔ Adapters needed to integrate the existing code
MODIFY
adjust_numbers
LOCK
READ
save
MANAGED
For greenfield developments with standard implementation
(opt. unmanaged application components: e.g., DB tables, lock/PFCG objects,
Transactional
buffer update task function modules)
➔ Standard CRUD operations work out of the box
SAP HANA
➔ Developers add BO specific business logic
BUSINESS OBJECT (BO) RUNTIME
BUSINESS SERVICE
* planned
BIND TO SCENARIO
AND PROTOCOL
SERVICE
DEFINITION
AUNIT
Scenario and integration test
DEFINE SCOPE
PROJECT ELEMENTS
AND ENRICH PROJECT BEHAVIOR
AUTHORITY-CHECK
Lock object
APPLICATION DATA
DATABASE TABLES
Cloud environment expects high availability, continuous delivery, and low TCO
RESTful avoids problematic server stickiness by introducing a stateless communication
Draft fills the gap between stateless communication and stateful application
Modern user experience requires multi device support and data loss prevention without
connection timeouts
Draft persists the state device independently in a non-process-relevant way
RESTful makes the draft available as an addressable resource
Guiding principle
Draft is the persisted transactional buffer as an addressable resource
Perceived Perceived
transaction transaction
IMPACT
Back-end Back-end
execution execution
IMPACT IMPACT
for end users for end users
No feedback (such as messages, feature control) Early feedback comes from calculations and validations in
until SAVE is triggered the back end, including feature control
Draft automatically supports data loss prevention, continuous
work, and device switch
SERVICE BINDING
SERVICE DEFINITION
Modification-free extension of RAP BOs
EXTENSION
SERVICE PROJECTION
and business services
EXTENSION
RAP BO INTERFACE
BUSINESS BO projection view BO projection view RAP extension points possible for …
SERVICE Behavior projection Behavior projection
EXPOSURE ❖ Data model extension
❖ BO behavior extension
❖ BO node extension
EXTENSION
Data model Exposed in RAP based UI services and
Behavior definition
Web APIs
DOMAIN-SPECIFIC
Learn more in the RAP Extensibility Guide
IMPLEMENTATION
AVAILABLE TODAY
Service Tests ➢ ABAP TDF
SERVICE BINDING
AUNIT & LOCAL CLIENT PROXY
➢ CDS TDF
SERVICE DEFINITION ➢ ABAP SQL TDF
➢ Function Modules TDF
SERVICE PROJECTION ➢ RAP BO TDF (link)
CDS - BO projection view ➢ Authority Helper
BUSINESS BDEF - Behavior projection
➢ ABAP Test Seams
SERVICE ABAP - Behavior implementation
EXPOSURE BO Tests ➢ OData Local Client Proxy
AUNIT & ABAP / EML
➢ Test Relations
➢ OData V4 test class generator in
RAP BUSINESS OBJECT the cloud
CDS - Data model ➢ Official RAP Test Guide (link)
BDEF - Behavior definition
ABAP - Behavior implementation
Unit Tests
AUNIT & ABAP
DOMAIN-SPECIFIC PLANNED
IMPLEMENTATION ➢ BDEF test class generator
AUNIT: ABAP-Unit
TDF: Test Double Framework
ABAP CROSS
TRACE
BROWSER
DEVELOPER
TOOLS
DATA PREVIEW
ANNOTATION
PROPAGATION
DICTIONARY
LOG
ACTIVATION ACTIVE
GRAPH ANNOTATIONS
ABAP Cloud is the development model provided to build cloud-ready enterprise services, apps, and extensions on
SAP BTP ABAP environment and all editions1 of SAP S/4HANA, in the cloud and on-premises
Development that is done with ABAP Cloud adheres to the clean core principles
The ABAP RESTful application programming model (RAP) is at the heart of ABAP Cloud for efficiently building
transactional OData-based services and SAP Fiori apps 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 ABAP Cloud (incl. RAP) feature set is enhanced quarterly in SAP BTP ABAP environment, twice a year in
SAP S/4HANA Cloud Public Edition, and every two years in SAP S/4HANA Cloud Private Edition and SAP S/4HANA
See the ABAP Cloud Release Notes and the ABAP Cloud Roadmap Information
1 SAPS/4HANA any premise or SAP S/4HANA Cloud, private edition release ≥ 2022
SAP S/4HANA Cloud, public edition release ≥ 2208, 3-system landscape required
Learn more about SAP Fiori elements Feature Showcase App with RAP
👩🏫 SAP Learning Journey: Practicing Clean Core Extensibility for SAP S/4HANA Cloud
🥇 Become an SAP Certified Associate – ABAP Cloud Back-End Developer
Overview, comparison of
How the old, tier 3 / classic ABAP How to check compliance
extensibility options, introduction How to leverage tier 2 of the
world maps to the new, tier 1 / with the ABAP Cloud and
to ABAP Cloud and 3-tier 3-tier extensibility model.
ABAP Cloud world. 3-tier extensibility model
extensibility model.
© 2024 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material.