Getting Started with ABAP Cloud & SAP RESTful Application Programming Model (RAP)
ABAP Cloud is the modern development model for SAP S/4HANA and SAP BTP ABAP Environment. At its heart lies the **RESTful Application Programming Model (RAP)**, designed to build transactional, cloud-native OData services seamlessly.
---
//1. Introduction to ABAP Cloud
With SAP S/4HANA, traditional ABAP programming patterns (such as direct database modifications via `MODIFY ztable` inside SAPGUI screens) are superseded by strict released APIs and business object frameworks.
Key tenets of ABAP Cloud: - **Clean Core Strategy**: No direct modifications to standard SAP objects. - **Strict ABAP Syntax**: Cloud-enabled ABAP rules with restricted language scope. - **CDS-first Data Modeling**: Core Data Services drive entity relationships.
---
//2. RAP Architecture Overview
RAP segregates applications into distinct architectural layers: 1. **Data Model Layer**: CDS Data Definitions (Root View Entities & Projection Views). 2. **Behavior Layer**: Behavior Definitions (`BDEF`) and Behavior Implementations (`ABAP Class`). 3. **Service Layer**: Service Definition (`SRVD`) and Service Binding (`SRVB`).
---
//3. Creating Data Model (CDS View)
Define your root view entity for a Sales Order header:
---
//4. Behavior Definition (BDEF)
Specify standard CRUD capabilities (`create`, `update`, `delete`) and custom actions:
---
//5. Behavior Implementation (ABAP Class)
Implement the custom `approveOrder` action using EML (Entity Manipulation Language):
---
//6. Preview & Testing in Fiori Elements
Publish a **Service Definition** and generate a **Service Binding (OData V4)**. ADT (ABAP Development Tools in Eclipse) provides an integrated SAP Fiori Elements Preview tool to interactively test your full-stack application!

Discussion & Feedback0
Ask questions, share SAP insights, and discuss ABAP implementation details.