Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

Introduction

In this project, you set out to build a Simple Managed RAP (ABAP RESTful Application Programming) application on SAP BTP ABAP Environment using Eclipse ADT. The goal is to design a lightweight Billing Document Header maintenance app with Create and Delete capabilities, following best practices for Managed RAP development.

The application uses a custom transparent table for storing billing document header data and implements standard RAP layers — Database Table, Interface View, Projection View, Metadata Annotations, Behavior Definitions, Service Definition, and Service Binding.

By leveraging Managed RAP,  you do not need to write custom CRUD logic — the framework auto-generates this functionality, allowing you to focus purely on data modelling, UI annotations, and service exposure. This demonstrates how RAP accelerates application development in the cloud while complying with ABAP Cloud clean-core principles.

 

Objectives:

Creating a Simple Managed RAP based UI using BTP and Eclipse IDE with Create & Delete actions on custom Billing Document header table.

Requirements/Task(s):

  1. Create required Database Table(s)
  2. Create CDS views for the Database Table –
    • Interface View and
    • Consumption (Projection) View
  3. Create Metadata View on Consumption View
  4. Create Behavior Definition for Interface View
  5. Create Behavior Definition for Consumption View
  6. Create Service Definition for Consumption View
  7. Service Binding for the Service Definition
  8. Test the Application

Objects List

AnithaSwamy_0-1754496288291.png

 

Outline the steps/plan for your project:

  1. Step1: Create Database Table (Eclipse - Data Dictionary-Database Table)

AnithaSwamy_1-1754496288295.png

 

 

Check the created Database Table structure (Right click – Open With - Data Preview)

 

AnithaSwamy_2-1754496288297.png

Step 2: Create Interface Root view CDS for the database table created (right click database table - Data Definitions - Root View template)

           

AnithaSwamy_3-1754496288300.png

 

Step 3: Create Consumption/Projection Root view CDS for the database table created (right click database table - Data Definitions - Root View template)

           

AnithaSwamy_4-1754496288302.png

Step 4: Create Metadata that helps with designing aspects of the UI (Right click on the Projection View you created and select new "Metadata Definition")

           

AnithaSwamy_5-1754496288310.png

Step 5: Create Behaviour Definition - one fore Interface view and one for Consumption view you have created

Step 5a: Create Behaviour Definition for the interface view ((Right click the Interface CDS View and choose Behaviour Definition option)

                       

AnithaSwamy_6-1754496288313.png

Step 5b: Create Behaviour Definition for the Projection view (Right click the Projection CDS View and choose Behaviour Definition option)

AnithaSwamy_7-1754496288314.png

Step 6: Create Service definition (Right click CDS Projection View and click "New Service Definition")

Expose the Consumption View CDS.

                       

AnithaSwamy_8-1754496288316.png

 

Step 7: Create Service Binding (Right click on the new Service definition you created and choose "New Service Binding" and Choose OData V4 version for the UI)

Select the Service Definition displayed on the versions section of the page and hit "Publish" button.

It will take some time. Once it is done, a Service URL will be created and the binding will be displayed.

  

AnithaSwamy_9-1754496288320.png

 

Step 8:  Test the Application: Select the Entity and hit Preview button, a new Window will be opened with the RAP UI App you created.

                    

AnithaSwamy_10-1754496288327.png

 

 

A new window will open with the UI for the Application we created:

AnithaSwamy_11-1754496288331.png

 

 

Click “Go” Button, so that the values are pulled from the Database table to be shown on the screen.

 

AnithaSwamy_12-1754496288337.png

 

You can see the database records displayed on the screen. The Create and Delete buttons are available for creating new records and deleting existing records. Since this is Managed RAP application, the code necessary for the Create and delete operations are handled automatically by the Framework, there is no explicit code necessary for these simple actions. If customizations are required then it can be handled via Implementation Class (Behaviour Pool Classes) of the Behaviour Definition.

Project link:

https://github.com/ABAPAnitha/RAP-for-Bill-doc-header-and-Items

Conclusion

This project highlights how quickly and efficiently a Managed RAP application can be built on SAP BTP using the ABAP RESTful Programming Model. The framework automatically handled the Create and Delete operations, proving the advantage of Managed scenarios where minimal custom coding is required.

We also learned how UI metadata annotations can be used to control the look and feel of the Fiori Elements-based UI without any frontend coding, and how RAP’s structured approach — from database table to service binding — enables a clean, maintainable, and extensible application design.

Going forward, you can extend this solution with:

  • Custom business logic in Behavior Pool classes,

  • Associations to billing item entities for a complete billing document structure,

  • Advanced annotations for richer UI interactions.

Overall, the Managed RAP approach proved to be a fast, cloud-compliant, and developer-friendly way to deliver maintainable SAP applications aligned with the ABAP Cloud strategy.

3 Comments
Labels in this area