Exercise: Creating a RAP BO (Business Object) and a Custom Fiori UI

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Create a custom RAP BO and integrate it with released RAP Purchase Requisition API

Create a custom RAP BO (Business Object) For a Specific Business Context and Integrate Released RAP Facades (a Purchase Requisition API)

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.



  1. Log on to the SAP S/4HANA Cloud ABAP Environment (Eclipse-ADT), and create a new ABAP package. 

  2. 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. 

  3. Now we will create a CDS data model. Refer to the architecture diagram above to connect with what you are doing. 

  4. Create a projection view. 

  5. Create behavior definition for the CDS data model view created above. 

  6. Create behavior definition for the projection view. 

  7. Create a new Service Definition. 

  8. Create a new Service Binding. 

  9. Create a new database table for purchase requisition and corresponding fields. 

  10. Create a new CDS view entity for the database table ZPUR_REQ_DET_###. 

  11. Enhance the business implementation logic. 

  12. Implement the internal method to create a Purchase Requisition when order is created. 

  13. Run the Preview for the Fiori Elements App. 

  14. Logon to the SAP S/4HANA Cloud system and display the created Purchase Requisition. 


Log in to track your progress & complete quizzes