Hi Krishna
I will try and help.
The first thing i notice is you are using OData.request, this is not part of SAPUI5, OData is a global introduced by the datajs thirdparty plugin, I would recommend not using it directly, instead use the ODataModel API start by reading the Class sap.ui.model.odata.ODataModel and ODataModel. There are a lot of good of reasons for using the ODataModel, like databinding, event handling, it doesn't smell like a leak, besides the SAPUI5 ODataModel is a lot easier to use.
try something like this
var url = 'http://XXXXX.XXXXX.com:8000/sap/opu/sdata/sap/ZBANKRFCGANESH'; var bJSON = true; //use JSON var sUser = 'ganesh'; var sPassword = 'login@1234'; // create a model for OData service call var oModel = new sap.ui.model.odata.ODataModel(url, true, sUser, sPassword); sap.ui.getCore().setModel(oModel); var path = '/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')'; // create the data var data = { "value": "0203_IN120", "scheme_id": "Z_BANK_RFC_GANESH", "scheme_agency_id": "LOCAL", "post_bank": "", "bank_branch": "Park Street", "street": "Russel Street", "city": "KOLKATA", "swift_code": "", "region": "WB", "bank_name": "HSBC", "pobk_curac": "", "bank_group": "", "addr_no": "" } // get a CSRF token if needed oModel.refreshSecurityToken(); // add own callback code var oParams, fnSuccess, fnError, bUseMERGE; //PUT data back to server oModel.update(path, data, oParams, fnSuccess, fnError, bUseMERGE);
Let us know how you get on
hth
jsp
Message was edited by: John Patterson
I really dislike the SCN editor, especially the way it re formats code so it cannot be read while writing