The ABAP Cloud Programming Model For SAP by DVK
The ABAP Cloud Programming Model For SAP by DVK
(BTP) is designed to enable developers to build scalable, modern, and cloud-native applications using
ABAP while adhering to best practices in the cloud environment. This programming model is part of the
ABAP RESTful Programming Model (RAP), which aligns with SAP's vision of cloud-first development,
facilitating agile and extensible solutions.
The ABAP Cloud programming model focuses on providing a more simplified and modern approach to
ABAP development compared to traditional on-premise SAP systems. It emphasizes the use of cloud-
friendly patterns such as modularization, service-based architectures, and integration with cloud-
native technologies.
Here's an overview of the ABAP Cloud Programming Model for SAP S/4HANA Cloud and its key
components:
1. Cloud-Native Architecture:
o Cloud-native means that the application can leverage cloud scalability, modularity, and
flexibility while being tightly integrated with other cloud services (e.g., microservices,
APIs).
o It also allows side-by-side extensibility, where custom development can occur alongside
standard cloud applications.
o RAP is the foundation for ABAP Cloud development. It allows developers to design and
implement applications using the RESTful principles, which is ideal for cloud
environments.
o RAP focuses on Business Objects (BOs), which encapsulate business logic and define
data models in Core Data Services (CDS) views. These Business Objects are exposed as
OData services for consumption by modern UIs (such as SAP Fiori).
o Transactional Business Logic: RAP supports both read and transactional operations such
as Create, Read, Update, and Delete (CRUD). Developers can implement business logic
and workflow for these operations.
o CDS views are used to define data models for the ABAP Cloud programming model.
These views define the structure and relationships of business data, using annotations
to specify metadata, user interfaces, and behavior.
o CDS-based Business Objects: In the ABAP Cloud programming model, CDS views are
used to represent business entities that integrate with the underlying database and
application logic. These can be exposed as OData services for consuming external
applications.
@AbapCatalog.sqlViewName: 'ZBO_EMP'
@OData.publish: true
@AccessControl.authorizationCheck: #CHECK
key employee_id,
employee_name,
hire_date
4. Service Layer:
o In the ABAP Cloud programming model, the service layer exposes Business Objects as
OData services and is implemented using ABAP Managed Database Procedures
(AMDPs) or ABAP classes.
o The service layer connects the business logic (defined in CDS views) with external
consumers (like Fiori apps or other external systems), and it provides capabilities for
handling actions such as creating, updating, and deleting data.
5. Transactional Support:
o The ABAP Cloud programming model supports transactional behaviors. This includes
handling ACID transactions (Atomicity, Consistency, Isolation, Durability) for operations
like Create, Update, and Delete.
o SAP Fiori UI elements are directly integrated into the ABAP Cloud programming model
using annotations. These annotations enable the automatic generation of UIs that are
responsive and user-friendly.
key employee_id,
employee_name,
hire_date
7. Side-by-Side Extensibility:
o The ABAP Cloud programming model allows you to extend standard applications in a
side-by-side manner, meaning you can add custom business logic, UI elements, and
services without modifying the core applications.
o Extensions are implemented in SAP BTP and connected to the cloud-based SAP
S/4HANA system. This approach ensures that upgrades to standard applications do not
affect custom developments.
o ABAP Cloud programming aligns with modern architectural styles such as microservices.
Developers can build applications that communicate with other cloud services using
APIs, both RESTful and SOAP-based, making the application more modular and scalable.
o SAP Integration Suite provides tools for integrating ABAP Cloud applications with other
SAP or third-party systems.
o First, define the Core Data Services (CDS) views that represent the business entities
(tables or structures) for your application. These views will capture the business data
and relationships.
o Add annotations for UI integration and define metadata like labels, field types, and
visibility.
o Implement the service layer by creating ABAP classes that define business logic and
actions (Create, Update, Delete, etc.). These classes will be used to expose the OData
services.
o The service implementation layer will use ABAP Managed Database Procedures
(AMDPs) to handle operations and interact with the database.
o Use the @OData.publish: true annotation in the CDS views to expose the data as OData
services that can be consumed by external clients (like SAP Fiori UIs, mobile apps, etc.).
o The OData services can automatically handle CRUD operations for the defined business
objects.
o Use Fiori Elements to automatically generate user interfaces based on the annotated
CDS views. Fiori Elements support the use of UI annotations for things like line items,
selection fields, and other UI components.
o The generated UIs will be consistent and responsive, and they will automatically interact
with the OData services.
o Once the application is built, deploy it to SAP BTP and integrate it with your SAP
S/4HANA Cloud system. The application will be accessible via cloud-based services and
external systems.
1. Cloud-Native: ABAP Cloud is designed to work in the cloud-first environment, making it ideal for
SAP S/4HANA Cloud and SAP BTP. It leverages cloud infrastructure for scalability, modularity,
and flexibility.
3. Side-by-Side Extensibility: You can extend standard SAP applications without modifying their
core functionality, ensuring smooth upgrades and easier maintenance.
4. Modern UI Integration: With Fiori and UI annotations, ABAP Cloud integrates directly with SAP
Fiori Elements to generate consistent, responsive, and user-friendly UIs.
5. Automatic OData Services: OData services are automatically exposed via CDS views, allowing
for seamless data communication between the backend and frontend systems.
6. Transaction Management: The ABAP Cloud model provides built-in support for managing
transactions, ensuring consistency and reliability in cloud environments.
Conclusion
The ABAP Cloud Programming Model is an essential framework for building scalable and efficient
applications in SAP S/4HANA Cloud and SAP BTP. By leveraging modern principles such as RAP, CDS
views, OData services, and Fiori UI integration, the model enables developers to create cloud-native,
modular, and extensible solutions that align with SAP's cloud strategy.