Quantcast
Channel: Visual BI Solutions
Viewing all articles
Browse latest Browse all 989

Expose SAP Data Sources to OData in BW/4HANA

$
0
0

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-odata-bw-4hana

A project is created with the structure shown below. Click on save the project.
expose-sap-data-sources-odata-bw-4hana

Define the data model extraction type. In the context menu choose to Redefine a ODP Extraction.
expose-sap-data-sources-odata-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-odata-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-odata-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-odata-bw-4hana
  • Entities, Data model, and services are created and readily available in the project.
    expose-sap-data-sources-odata-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-odata-bw-4hana
  • All the objects generated are editable and we can change them.
    expose-sap-data-sources-odata-bw-4hana
  • Once these objects are generated, the runtime objects are created in the below location.
    expose-sap-data-sources-odata-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-odata-bw-4hana
  • To register it, Select ‘Register’ in the context menu of the service and fill up the details.
    expose-sap-data-sources-odata-bw-4hana

 

expose-sap-data-sources-odata-bw-4hana

 

  • Once it’s enabled, the Registration Status is changed to ‘Green’.
    expose-sap-data-sources-odata-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-odata-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.

Subscribe to our Newsletter

The post Expose SAP Data Sources to OData in BW/4HANA appeared first on Visual BI Solutions.


Viewing all articles
Browse latest Browse all 989

Trending Articles