Skip to Content
0
Jun 17, 2016 at 07:09 AM

Getting error in CRUD operations while using sap.ui.model.odata.v2.ODataModel

406 Views

Hi Experts,

I'm getting error in CRUD operations while using sap.ui.model.odata.v2.ODataModel.Before that let me explain what i did in sap.ui.model.odata.ODataModel.

This is my url = "/sap/opu/odata/xxxxx/xxx_OBJLIST_LIST_SRV/ObjListSet?$filter=Aufnr eq '7007204' and Screenid eq ''&$format=json";

var ServiceUrl = "/sap/opu/odata/xxxxx/xxx_OBJLIST_LIST_SRV/";

var sPath = "ObjListSet?$filter=Aufnr eq '" + selectedOrderListRow.Aufnr + "' and Screenid eq ''&$format=json";

var oDataModel = new sap.ui.model.odata.ODataModel(ServiceUrl,true);

oDataModel.read(sPath, null,null,true,

function onSuccess(oData, oResponse)

{

successFunc(oData);

},

function onError(oData, oResponse)

{

});

it's working fine..but if i changed to sap.ui.model.odata.v2.ODataModel getting error.

So can you please explain how to integrate the services in sap.ui.model.odata.v2.ODataModel.

Thanks,

Palsaran