on 10-28-2015 8:05 AM
Hi experts,
how we can do calculation on json output from odata and create a new json data and feed the json data to ui5 control
thanks in advance
Hi Shahid,
By using ODATA Model--->under Success Block--->
var oModel = new sap.ui.model.odata.v2.ODataModel(sServiceUrl, null, username, passwrd,
function(odata){
var data = odata.results;
//Now data has [{ "name":"1" }, {"name" : "2"}]
});
use this data in your JSON Model. if you want to change this structure.
Use for loop to create your own structure.
Check this: Simple OData Binding with SAPUI5 | SCN
OR
You can directly bind odata model to table/list.
for eg:
Referred from: http://scn.sap.com/community/developer-center/front-end/blog/2015/10/23/treetable-odata-binding
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.