Skip to Content

sap UI5 JSON Odata with Parameter

Jul 19, 2017 at 03:10 AM


avatar image

Hello Gurus,

I need your quick help on this. Below is my model returning in json format. My service accepts MATNR field as input parameter and returns the output. I know how to provide parameter in odata model, but here I'm stuck on how to pass the parameter to the JSON Model. can you please provide me the code? Appreciate your help.

var oModel = new sap.ui.model.json.JSONModel("/sap/opu/odata/SAP/ZBD_SRV_01/OutSet?$format=json");

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 20 at 11:45 AM


Not sure I understand your question. If you have your oData in the format you want it then call the JSONModel with the URL where to load the JSON from the same way you would with the oData or call the oData and convert it to the format of JSON you wish to have by using JSON.parse()

10 |10000 characters needed characters left characters exceeded