Enterprise Resource Planning Blog Posts by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
rajat_verma3
Explorer
86,819
In this blog, you will learn how to create a simple RAP model. In this example, we will create a table, CDS view entity, Metadata extension, Behavior definition, Service definition, Service Binding.

We will create below application for creation of Driver detail with the help of FIORI element.


Step 1 --> Create table - ZRV_RAP_DRIVER

Right click on the package --> New --> Other ABAP Repository Object --> Select Database Table and enter the the name of the table.


Here is the code snippet.


Step 2 --> Create Root CDS Entity ZI_RAP_DRIVER

Right click on the package --> New --> Other ABAP Repository Object --> Select Data Definition and enter the the name of Root CDS Entity --> Select Define Root View Entity.


Here is the code snippet.


Step 3 --> Create a Metadata Extension

Right click on root view entity --> Select New Metadata Extension --> Enter the the name of Metadata Extension.


Here we annotate the CDS Entity and fields we add screen position, set selection field etc.

Here is the code snippet.


Step 4 --> Create a Behavior Definition

Right click on root view entity --> Select New Behavior Definition.

All detail will be already filled, just click next.


Here is the code snippet,

Note --> For managed scenario we don’t need a class. Create, Delete, Update functionality will work as a standard(It is required to handle for non-standard action, features, determination, validations and so on that will be covered in coming Part-2)


Step 5 --> Create a Service Definition

Right click on root view entity --> Select New Service Definition


Here is the code snippet.


Step 6 --> Create Service Binding

Right click on service definition --> Select New Service Binding.

Here we need to choose Binding type OData V2-UI or OData V4-UI, for now we have chosen V2-UI.



Now publish the Service by clicking on Publish button.


Our RAP model is completed, now test the application.

Test Application -->

Select Service and click on preview button.


Click on Go --> To see the data, if already available in system.


Click on CREATE --> Here we can create new driver.


UPDATE / DELETE --> To update or delete the record.

Select the entry from the list.


These buttons appear on the top right corner.


Conclusion --> After reading this blog you will be able to create simple RAP model application.

Give it a try and let me know in the comments if you need any help/support.

Please feel free to suggest if any correction is needed 🙂
9 Comments
j_pavan_kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rajat,

Nice blog.

One small correction in the note section, it is wrongly stated that behavior implementation class is not required for managed implementation (Step 4).

It is required to handle for non-standard operations(actions), authorizations, features, determination, validations and so on.

Thanks,

Pavan
rajat_verma3
Explorer
0 Kudos
Hi Pavan,

Thanks for the suggestion,

Point considered.

Best Regards,

Rajat Verma
asim_ahmed1
Explorer
0 Kudos
Hi Rajat,

 

Thanks for sharing. Nice Blog.
praveen_sekar
Explorer
0 Kudos
HI Rajat,

 

I have tried the same but getting an insufficient auth issue. Do u have any idea?


 

Thanks,

Praveen
amaremishra
Newcomer
0 Kudos
Hi Rajat,

 

I am getting an error while creating Root View Entity for the Table :

 

Syntax error: Keyword ENTITY not allowed.

 
dsihan
Explorer
0 Kudos

I have a question, in the Create a Fiori Application using RESTful Applicati... - SAP Community blog

it says that we have to create projection view and add behavior definition for that projection view.

I want to know what is the between the method? and what are the advantages of both? when should we use one over another? or simply which method is just better?

thanku

sanliya77
Discoverer
0 Kudos

Hi Rajat,

Nice Blog..

Not able to view the images.

 

Satya_113
Discoverer

Hi Rajat,

Thanks for sharing this.

AjayVarikallu
Newcomer
0 Kudos

Hi Rajat,
I am facing dump while creating entries or displaying entries.
please help me.

2025-05-13_09h51_32.png

Labels in this area