This blog is for the beginners who find difficult to understand binding of odata.

All you have to do is to trust Descriptor Editor in manifest.json and it will take care of your complex code to be written in manifest.json and neo-app.json.

  1. Make the below destination in hanatrial.

 

2. Create a Project from the template “SAPUI5 Application”.

Click on “Next”. Give Project Name and Namespace and click on Finish Button.

3. Below is the structure created.

Go to “Descriptor Editor” of “manifest.json”. It will look as shown in figure below.

Click on Data Sources and click on + button and make the entries as shown in figure. Click on test to get the collection in services. Click on Next then Finish.

The URL used to read the northwind service is http://services.odata.org/V2/Northwind/Northwind.svc/

In “Choose a system to connect the required service”, the only service will be displayed for which destination is set up in hanatrial.If no service is coming up in list, make the destination in hanatrial as shown in first figure.

4. Now click on Models and click on + button.

5. Enter any Model name and select data source and click on ok button.

The screen will look like this.

 

6. Go to view and write the below code.

<List items="{NorthwindNamedModel>/Customers}">
<items>
<ObjectListItem title="{NorthwindNamedModel>CompanyName}"/>
</items>
</List>

 

Save your code and Run the project.

Any suggestions/ questions are welcome.

 

Thanks

Kiran Israni

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply