Technology Blog Posts by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
anjan_paul
Active Contributor
38,664

SAP RAP (ABAP RESTful Application Programming Model) has two main flavors: managed and unmanaged. Let's focus on the unmanaged version.

Unmanaged SAP RAP refers to a development approach where developers have more control over the data persistence and business logic compared to the managed approach. Here are some key aspects:

  1. Custom Logic: In unmanaged RAP, developers write their own custom logic for handling data retrieval, manipulation, and persistence. This gives more flexibility in how data is processed and stored.
  2. Direct Database Access: Developers can directly access the database tables and define their own data models using Core Data Services (CDS) views or ABAP classes.
  3. Explicit Service Definition: Unlike managed RAP, where service definitions are automatically generated based on annotations, unmanaged RAP requires developers to explicitly define service implementations and behaviors.
  4. Manual CRUD Operations: CRUD (Create, Read, Update, Delete) operations need to be implemented explicitly in unmanaged RAP, giving full control over how data is managed.
  5. Integration with Existing Systems: Unmanaged RAP is often used when integrating with existing systems or when there is a need for complex business logic that cannot be easily handled by the managed approach.
  6. Flexibility: Developers have more freedom to implement complex validation rules, authorization checks, and other custom requirements directly in the application logic.

Overall, unmanaged SAP RAP provides a more hands-on approach to application development compared to the managed approach, allowing developers to leverage their expertise in ABAP programming and database handling while building modern RESTful APIs.

Top of Form

anjan_paul_0-1720068224622.png

 

 

 

In this example, we will show a simple application for Employee build with RAP Unmanaged flavors.

 

Development steps.

 

To be summarized below object will be created for Unmanaged scenario.

anjan_paul_1-1720068224631.png

 

 

Table ZT01_EMPLOYEE

 

anjan_paul_2-1720068224632.png

 

 

Base CDS View Z_I_EMPLOYEES_U

 

anjan_paul_3-1720068224633.png

 

 

Consumption CDS view  Z_C_EMPLOYEES_U

 

anjan_paul_4-1720068224639.png

 

 

 

 

Behavior Definition

 

anjan_paul_5-1720068224640.png

 

Bottom of Form

 

Behavior  definition

anjan_paul_6-1720068224641.png

 

 

Implement the Create  method

anjan_paul_7-1720068224644.png

 

 

Implement Update Method

anjan_paul_8-1720068224646.png

 

Implement Delete Method

anjan_paul_9-1720068224649.png

 

 

Implement Adjust_Numbers method.

anjan_paul_10-1720068224652.png

 

Implement Save method.

anjan_paul_11-1720068224652.png

 

 

Test

  1. Open the Application.

 

anjan_paul_12-1720068224655.png

 

 2. Click on Create. Give Input value and Create.

 

anjan_paul_13-1720068224657.png

 

3. New Record got created.

 

anjan_paul_14-1720068224660.png

 

4. Select any Row , click on Edit.

 

anjan_paul_15-1720068224662.png

 

5. Change the value and Save.

anjan_paul_16-1720068224664.png

 

6. Record will be updated.

 

anjan_paul_17-1720068224666.png

7. Select the Rows and click on Delete.

 

anjan_paul_18-1720068224668.png

 

8. Records will be deleted.

 

anjan_paul_19-1720068224670.png

 

9. In the Database table also you can see the records.

 

anjan_paul_20-1720068224671.png

 

 

So, all the  CRUD operation is successful using RAP Unmanaged flavors.

 

 

 

 

 

 

11 Comments
Labels in this area