Skip to Content
avatar image
Former Member

sap UI5 JSON Odata with Parameter

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");

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 20 at 11:45 AM

    Hi,

    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()

    Add comment
    10|10000 characters needed characters exceeded