Build A Simple SAP RAP List Report Application
Build A Simple SAP RAP List Report Application
Steps:
1. Create a new ABAP package.
2. Add a Core Data Services (CDS) view to define the data model.
3. Create a Service Definition and Service Binding.
The core of any RAP List Report is the CDS view, which defines how data is structured and retrieved. In
our case, let’s assume we're building a report that displays students details.
To create a new CDS view, right-click the table view in ADT, select 'New Data Definition,' and define
how the data will be structured for the report
After selecting 'New Data Definition,' enter the package, name your CDS view, and provide a
description. Once completed, click 'Next' to proceed
Choose 'Define View Entity' as the CDS view type and click 'Finish' to create the initial structure of the
CDS view
The CDS view has been created, but it contains some initial errors. These errors are common and can
be resolved by adding the necessary annotations
To clear the errors, add the required annotations such as @[Link]. These
annotations ensure the proper functionality of the CDS view
Once the CDS view is ready, the next step is to expose it as a service.
Service Definition:
This is where we define which entities are exposed as part of the OData service.
Right-click the CDS view you just created, then select 'Service Definition' to begin exposing the data as an
OData service
In the next screen provide the service definition details and source type as definition and in referenced object
your cds view entity name and click on next and finish.
Service Binding:
The binding step defines how the service is consumed, either for UI purposes (Fiori apps) .
Right-click the service definition that was created and select 'Service Binding' to define how the service will be
consumed
Fill in the package, service binding name, description, and select the binding type 'ODATA V2 – UI’ andgive the
service def. that you have created prev. step and finish and activate.
Publish the service binding to make the OData service available for consumption in SAP Fiori or other
applications
Once the service binding is activated, you'll see options to preview the application and create a Fiori app. Use
the 'Preview' button to view the application before deploying
The below preview will be done in the browser.