Service Consumption and Web APIs using SAP ABAP RAP

by | Aug 18, 2021 | ABAP RAP

Home » SAP » ABAP » ABAP RAP » Service Consumption and Web APIs using SAP ABAP RAP

Preface – This post is part of the SAP ABAP RAP series.

Introduction

In this article, we will see how to create services in SAP RAP (RESTful Application Programming) and consume the same in UI5/Fiori using the given steps:

  1. Create service definition
  2. Expose entities in the Service Definition
  3. Create Service Binding
  4. Publish OData service
  5. Implement OData in UI5/Fiori

Create Service Definition

Right-click on Package >> New >> Other Repositories Objects >> Service Definition.
Provide the details to create a Service Definition.

SAP RAP Create Service Binding

Once the Service Definition is created, expose the required entities and activate it.

expose the required entities

 

Create Service Binding

Right-click on Package >> New >> Other Repositories Objects >> Service Binding.
Provide Package details, Name, Description and Service Definition name. Additionally, select the Binding Type to create Service Binding.

SAP RAP Create Service Binding

Verify the information. To expose the service, click on activate.

You can access the metadata details by following the Service URL provided in Service Binding. To preview the application, click on provided Preview button.

OData Publish SAP RAP

How to consume OData create by SAP RAP

Like any other OData created by CDS or SEGW, the OData of SAP RAP can be used similarly in UI5/Fiori Applications. Read more about OData here.

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Author