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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-1.png?resize=333%2C426&ssl=1)
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.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-2.png?resize=466%2C381&ssl=1)
Table ZT01_EMPLOYEE
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-3.png?resize=423%2C225&ssl=1)
Base CDS View Z_I_EMPLOYEES_U
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-4.png?resize=451%2C173&ssl=1)
Consumption CDS view Z_C_EMPLOYEES_U
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-5.png?resize=730%2C644&ssl=1)
Behavior Definition
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-6.png?resize=487%2C248&ssl=1)
Bottom of Form
Behavior definition
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-7.png?resize=447%2C159&ssl=1)
Implement the Create method
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-8.png?resize=605%2C386&ssl=1)
Implement Update Method
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-9.png?resize=605%2C375&ssl=1)
Implement Delete Method
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-10.png?resize=511%2C249&ssl=1)
Implement Adjust_Numbers method.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-11.png?resize=515%2C447&ssl=1)
Implement Save method.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-12.png?resize=467%2C66&ssl=1)
Test
1. Open the Application.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-13.png?resize=730%2C355&ssl=1)
2. Click on Create. Give Input value and Create.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-14.png?resize=730%2C555&ssl=1)
3. New Record got created.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-15.png?resize=730%2C431&ssl=1)
4. Select any Row , click on Edit.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-16.png?resize=730%2C296&ssl=1)
5. Change the value and Save.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-17.png?resize=730%2C544&ssl=1)
6. Record will be updated.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-18.png?resize=730%2C378&ssl=1)
7. Select the Rows and click on Delete.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-19.png?resize=730%2C366&ssl=1)
8. Records will be deleted.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-20.png?resize=730%2C324&ssl=1)
9. In the Database table also you can see the records.
![](https://i0.wp.com/www.erpqna.com/wp-content/uploads/2024/07/sap-rap-unmanaged-scenario-example-simplified-21.png?resize=356%2C145&ssl=1)
So, all the CRUD operation is successful using RAP Unmanaged flavors.