Business Scenario
An existing customer/partner wants to create a new business application for an online shopping platform. Users of this shopping app can order various electronic items like a powerbank. This can be realized with RESTful ABAP Programming Model (RAP). Once an item is ordered, a new purchase requisition is created via a Purchase Requisition API (RAP facade).
Architecture Overview
The figure below illustrates the high-level architecture components of the ABAP RESTful Application Programming Model (RAP). It shows the main technologies and artifacts needed to build an SAP Fiori app or a Web API with RAP from a design time perspective.

Prerequisites
Steps
Log on to the SAP S/4HANA Cloud ABAP Environment (Eclipse-ADT), and create a new ABAP package.
Create a new custom database table. This table will be used to store the details of the order placed via the SAP Fiori Elements preview app.
Now we will create a CDS data model. Refer to the architecture diagram above to connect with what you are doing.
Create a projection view.
Create behavior definition for the CDS data model view created above.
Create behavior definition for the projection view.
Create a new Service Definition.
Create a new Service Binding.
Create a new database table for purchase requisition and corresponding fields.
Create a new CDS view entity for the database table ZPUR_REQ_DET_###.
Enhance the business implementation logic.
Implement the internal method to create a Purchase Requisition when order is created.
Run the Preview for the Fiori Elements App.
Logon to the SAP S/4HANA Cloud system and display the created Purchase Requisition.