0% found this document useful (0 votes)
1 views3 pages

ABAP RESTful Application Programming Model

The document outlines a step-by-step guide for creating a Fiori-enabled app to manage employee records using SAP RAP. It details the necessary artifacts, including database tables, CDS views, metadata extensions, behavior definitions, service definitions, and service bindings. The final result is a Fiori app that allows for full CRUD operations on employee records.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views3 pages

ABAP RESTful Application Programming Model

The document outlines a step-by-step guide for creating a Fiori-enabled app to manage employee records using SAP RAP. It details the necessary artifacts, including database tables, CDS views, metadata extensions, behavior definitions, service definitions, and service bindings. The final result is a Fiori app that allows for full CRUD operations on employee records.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Sure, Satyaranjan!

Since you're already well-versed in SAP RAP, let’s walk through


a simple managed scenario to reinforce the core concepts and give you a
clean reference. This example creates a basic Fiori-enabled app for managing
employee records.

Overview of RAP Artifacts

Layer Object Type Example Name

Database Table ZEMPLOYEE

Data Modeling CDS View Entity ZEMPLOYEE_VIEW

UI Metadata Metadata Extension ZEMPLOYEE_METADATA

Behavior Behavior Definition ZEMPLOYEE_BEHAVIOR

Service Layer Service Definition ZEMPLOYEE_SERVICE

Exposure Layer Service Binding ZEMPLOYEE_BINDING

📦 Step-by-Step Example

1. Create Database Table

@EndUserText.label : 'Employee Table'

@AbapCatalog.tableCategory : #TRANSPARENT

define table ZEMPLOYEE {

key ID : abap.int4;

NAME : abap.string(50);

DEPARTMENT : abap.string(50);

2. Define CDS View Entity

@EndUserText.label: 'Employee View'

@AccessControl.authorizationCheck: #NOT_REQUIRED

@ObjectModel.modelCategory: #BUSINESS_OBJECT

@ObjectModel.representativeKey: 'ID'

define root view entity ZEMPLOYEE_VIEW as select from ZEMPLOYEE {

key ID,

NAME,
DEPARTMENT

3. Create Metadata Extension

@Metadata.layer: #CORE

extend view ZEMPLOYEE_VIEW with ZEMPLOYEE_METADATA {

@UI.lineItem: [{ position: 10 }]

ID;

@UI.lineItem: [{ position: 20 }]

NAME;

@UI.lineItem: [{ position: 30 }]

DEPARTMENT;

4. Define Behavior

define behavior for ZEMPLOYEE_VIEW

implementation in class ZCL_EMPLOYEE_BEHAVIOR

persistent table ZEMPLOYEE

create;

update;

delete;

5. Service Definition

define service ZEMPLOYEE_SERVICE {

expose ZEMPLOYEE_VIEW;

6. Service Binding

 Choose OData V2 or V4.

 Publish the service.

 Preview the app in Fiori Elements.

🚀 Result
You’ll get a Fiori app with full CRUD capabilities:

 Create new employee records

 Edit and delete existing ones

 Export to Excel or PDF

Want to explore unmanaged scenarios, actions, or draft-enabled apps next?


Or maybe dive into integration with BAPIs or semantic navigation? I’ve got
examples for those too!

You might also like