- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Binding OData service to SAP UI5 table
Your service end point is incorrect- var oModel = new sap.ui.model.odata.v2.ODataModel("http://admin- think:88/sap/...",{useBatch : true});.
To fix this issue, you need to remove “CoreOpenAppSet()” portion of the variable which is getting passed to ODataModel constructor. You need to pass function import using ODataModel- “oModel.callFunction()”.
Once function call is completed, you can bind the result using “setBindingContext” as in below code −
var oPromise = oModel.callFunction("/CoreOpenAppSet"); oPromise.contextCreated().then(function(oContext) { oView.setBindingContext(oContext); });
Advertisements