With the rise of cloud architectures and self-analytics, everyone needs the data to be readily available for them to make their own insights. OData (Open Data Protocol) is one of the easiest ways to expose data that allows us to create and consume queryable and interoperable RESTful APIs in a simple and standard way.

In SAP, we can expose a different set of objects using the below approach. Currently, the exposable objects are as follows.

  1. ABAP CDS Views
  2. BW Models
  3. Data Sources
  4. HANA Views

In this blog, we will see how to expose BW Data sources to OData.

Go to T-Code SEGW, create a project with type “Service with SAP Annotations” and fill the necessary details.

Expose SAP Data Sources to OData in BW/4HANA

A project is created with the structure shown below. Click on save the project.

Expose SAP Data Sources to OData in BW/4HANA

Define the data model extraction type. In the context menu choose to Redefine a ODP Extraction.

Expose SAP Data Sources to OData in BW/4HANA

In the Pop-up wizard, enter the required fields.

Wizard 1

  • Choose the RFC destination
  • Choose the type of object (CDS Views, HANA Views, BW models & Data Sources)
  • Add the objects that need to be exposed
Expose SAP Data Sources to OData in BW/4HANA

Wizard 2

  • In this Wizard, all the fields are mostly filled based on the project name. You can change the Data model and Service name as per your naming standards.
Expose SAP Data Sources to OData in BW/4HANA

Wizard 3

  • The system provides the entities that are available in the data sources. Select the ones that are needed and click on finish.
Expose SAP Data Sources to OData in BW/4HANA
  • Entities, Data model, and services are created and readily available in the project.
Expose SAP Data Sources to OData in BW/4HANA
  • Once the data model is generated, we need to create service runtime objects (ABAP Classes). Select the project in edit mode and click on the “Generate Runtime objects” icon shown below.
Expose SAP Data Sources to OData in BW/4HANA
  • All the objects generated are editable and we can change them.
Expose SAP Data Sources to OData in BW/4HANA
  • Once these objects are generated, the runtime objects are created in the below location.
Expose SAP Data Sources to OData in BW/4HANA
  • Once all the artifacts are created, we need to register the service that enables us to display HTTP responses that occur at runtime. Double click on the service to see the Registration Status.
Expose SAP Data Sources to OData in BW/4HANA
  • To register it, Select ‘Register’ in the context menu of the service and fill up the details.
Expose SAP Data Sources to OData in BW/4HANA
Expose SAP Data Sources to OData in BW/4HANA

  • Once it’s enabled, the Registration Status is changed to ‘Green’.
Expose SAP Data Sources to OData in BW/4HANA
  • To test the data generated via OData, Go to SAP Gateway client and choose the Entity set that you want to see.
Expose SAP Data Sources to OData in BW/4HANA
Expose SAP Data Sources to OData in BW/4HANA

With the exposure of BW Data sources to OData, we can leverage the existing module-centric and generic data sources readily available for reporting or move the data to a lake and use if for Data science analysis. We can also implement OData with delta capabilities. Refer to this blog for more details.

Know more about Visual BI Solutions SAP BW Services offerings here.


Corporate HQ:
5920 Windhaven Pkwy, Plano, TX 75093

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com


Copyright © Visual BI Solutions Inc.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This!

Share this with your friends and colleagues!