Create OData Model using OData Modeler

1
8400

Hello everyone, in this tutorial we will build an OData model using OData Modeler.

Before moving forward please make sure you completed the installation of OData Modeler in Eclipse IDE. To know about the installation procedure, click here.

So lets get started.

There are multiple ways of creating OData model using OData Modeler in Eclipse, they are

  1. Using a Blank OData Model
  2. Using a OData service metadata URL.
  3. Using a OData service metadata file.
  4. Using a existing OData service from the service catalog.

In this tutorial, we will look at the first option and create a OData model from a Blank OData Model.

Step-by-Step Procedure

1. To create OData model in Eclipse IDE, you need to switch to OData Perspective to do so navigate to Window → Open Perspective → Other and a Open Perspective window appears choose OData from the list and click on OK.

OData Perspective

2. Now you are in OData model perspective, next step is to create a project. To create a project navigate to File → New → Other and then in the Select a Wizard window appears, choose Project under the General folder and hit Next.

Select a wizard

3. In the New Project window, enter the project name and click on Finish to create a new project. The newly created project will appear in the Project Explorer.

New Project

4. Now create a blank OData model, to create it right click on the new project in the project explorer → NewOData Model.

New OData Model

5. In the Create New OData Model, enter the model name and choose Model content as Blank OData Model and click on Finish. A new model will be created and opens in the OData Model Editor.

Create a New OData Model

6. Now you are in the OData model editor, to create a model element drag and drop the element from the Palette into the graphical editor.

Add Model Element

7. Each and every model element will have different sections, for example Entity Type object consists of

  • Entity Sets
  • Properties
  • Navigation Properties

Enter the name of the Entity Type as SCARR and add properties CARRID, ScarrName and ScarrURL under Properties section. By default Entity Type Set name will proposed.

Add Entity Name and Properties

Now you have successfully created a model using OData Modeler. Stay tuned to us for more SAP OData tutorials.

Please feel free to comment and let us know your feedback. Subscribe for more updates

If you liked it, please share it! Thanks!

mail

SAPLearners.com is now on Telegram. Click here to join our channel and stay updated with the latest tutorials and updates.

Like us on Facebook and follow us on Twitter.

Comments are closed.