Skip to Content

oDatamodel.read giving issue in bsp application

Hi Experts,

I am using read method in oDataModel. The code is as below:

dataModel.read("/Z_ORDER_DETAILS_SET",{ method: "GET", filters: [Filter], success : function (oData, response) { obj = oData.results[0];});

It is throwing an error - SCRIPT438: Object doesn't support property or method 'getPath'

This is working perfectly well in local host , i.e when executed in eclipse , when i submit it to the backend and run using the bsp application it throws the above error.

Am i missing some package in backend ecc system ?Any pointers will be appreciated.

Thanks in advanced,

Sudha.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 27, 2017 at 11:36 PM

    The issue got solved when i used the below code:

    this.odataModel = new sap.ui.model.odata.ODataModel("http://XXXXXXXXXXX/sap/opu/odata/SAP/ZORDER_STATUS_UI_SRV"); this.odataModel.read("/Z_ORDER_DETAILS_SET?$filter=INVDOCNUM eq '"+invoice+"'",null, null, false, function(oData, oResponse){ debugger; obj = oData.results[0]; };

    I'm not sure what was wrong with the other code , but this works.

    Add comment
    10|10000 characters needed characters exceeded