- Why RAP ? SAP has always tried to separate business logic , UI and the database into different layers and over the years SAP has have come across different ways to achieve this goal be it Web Dynpro, SAP Fiori and now RAP. The RAP model provides an intrinsic approach to building SAP Fiori applications in ABAP that are optimized for SAP HANA and run both in the cloud and on premise.
The ABAP RESTful programming model (RAP) consists of frameworks, concepts, language features and the supporting tools and best practices. The data model can be defined in a clearer and more abstract way, we can get a quick preview in a form of a SAPUI5 application from our entities in just a few click where we can validate our development before the real UI development begins.
Below is the evolution of Restful ABAP Programming

The big picture

- Data Modeling and Behavior
Data models for CDS are defined in this layer. They contain CDS entities based on dictionary tables and more, which are represented as CDS views in ABAP. You can run queries on these CDS views and you can also define behaviors. There are multiple ways to implement behavior
I. Managed scenario: In a managed scenario, the RAP framework implements the behavioral elements while the complex logic can be added using ABAP
II. Un-managed scenario: In an unmanaged scenario, all the coding implementation is done by you
2. Business Service Provisioning
As you can see from the diagram, business service provisioning layer acts as an intermediate between data model and consumer of data. This layer allows you to control definition of business services like allow different behaviors to different users. These business services are used through service definition and service binding.
3. Service Consumption
The service consumption layer consumes all the services that are exposed on the business provisioning layer

The above diagrams explains pretty much what we are doing in RAP, from defining the CDS views based on which we can create projection ( fields which we want to expose ) and then bind all the views in a service which can be exposed via a serving binding.