SES 58: OData Services in-depth and Data Model Techniques

Did you know that the entire life span of an OData service falls under its life cycle? Some of the key points to remember in OData service life cycle include activating and maintaining OData services, maintaining models and services with metadata cache activation of REST applications.

By now you know that you can redefine a service from an existing OData service with the help of SAP Gateway Service Builder. If you wish to extend an existing data model, you can add a new parameter to the existing entity or simply add a navigation feature. This way, you can easily create the data model and extend it in SAP Gateway Service Builder. Once you’ve created your extended data model, a new OData service is created by SAP Gateway Service Builder with your new set of parameters and other changes in the model.

Business Object Processing Framework (BOPF)

What exactly is BOPF? Business Object Processing Framework (BOPF) service, lets the user have the business objects in the framework with the help of SAP Gateway BOPF Integration. The Business Object Processing Framework is developed on the basis of object-oriented ABAP, plus a bundle of features and generic services to speed up and change development. Now, how to implement BOPF in your system?

Steps to Add Objects using Business Object Processing Framework

  • In order to open the BOPF CONFIGURATION wizard, click on DATA MODEL and select REDEFINE * BOPF SERVICE.
  • Now choose BUSINESS OBJECT and DEFAULT QUERY and then, hit NEXT.
  • Provide details in the description field for MODEL NAME and SERVICE NAME in the SERVICE REGISTRATION window.
  • Once the registration is done, click on FINISHED. Now, you’ll be able to see the fields from business objects successfully added into your project.

You can even extend one of the existing OData services in the SAP Gateway Service Builder with the help of ODATA SERVICE (GW) function. The advantage here lies with you (as a user), as you can not just extend an existing OData service, but you can even overwrite one using this function. To access the GW function, click on DATA MODEL and select REDEFINE * ODATA SERVICE (GW).

Now, let’s dig deep!

Gen Interaction Layer

The Generic Interaction Layer short for GenIL, is the relation between backend business engine and Business Object Layer (BOL), which takes care of data transfer between the two layers. Thus, you can create a data model using this framework. To use GenIL, go to DATA MODEL and select REDEFINE * GENIL SERVICE and it will show you a list of available objects. You can also get a follow-through guide for step-by-step procedure of the framework using a free plugin provided in SAP Gateway Service Builder. Function lets you build a data model on existing OData service. And to do so, here’s a clear and simple procedure that you can follow:

  • To open EXTERNAL SERVICE wizard, click on DATA MODEL and then select REDEFINE * ODATA SERVICE.
  • Provide these details: SERVICE NAMESPACE, HTTP DESTINATION and SERVICE NAME. Now, click next. Also write description for DESCRIPTION field for the generated service or model. And then, hit NEXT.
  • Hit FINISH after selecting the fields. Here, on the new screen you’ll be able to create a data model in the project.

The INCLUDE Function for OData Service

From my recent blogs, you’ve seen different ways to build an OData service. In this section, I’ll discuss with you, the final method or way to build OData Services via mashups, which is done with the help of INCLUDE function.

You can implement this INCLUDE function whenever you wish to club or group an existing data model with another data model. Basically, you’ll be able to mashup more than two data models in order to get a new service without editing or changing the existing one.

Steps to build an OData Service using INCLUDE function

  • Click on DATA MODEL and select INCLUDE * ODATA SERVICE (GW), to use INCLUDE SERVICE CREATION wizard.
  • Now, provide the VERSION and TECHNICAL SERVICE NAME and then hit CONTINUE.
  • You’ll be able to see a new OData service in the project, now.

Thus, I’ve discussed in the recent blogs and shown you the basic fundamentals of OData, SAP Gateway Service Builder with entity type, sets, service implementations and maintenance. I’ve covered various methods to build or create a data model for your project and how to create an OData service using RFC/BOR interface.

I’ve also given the step-by-step procedure on how to build an OData service with the use of redefining methods and finally, the Generic Interaction Layer. So, I hope my last couple of blogs along with this one, were useful, precisely for OData in SAP Fiori. Let me know if you want to get more in-depth insights in SAP Fiori or any other module or a specific topic, in general.

Receive my tips and tutorials on SAP Industry and developments of SAP. Join my Community of SAP Professionals & Entrepreneurs!

Finally, CONNECT WITH ME ON FACEBOOK HERE. I’d love to hear about your experiences if you’ve worked in SAP, what modules are you certified in and more, on Facebook. I’d also love to help you in your SAP learning journey so that you achieve success in the industry.

Advertisements