cancel
Showing results for 
Search instead for 
Did you mean: 

HTML UI5

nishantbansal91
Active Contributor
0 Kudos

Hi,

Var oEntry = [];

oEntry.GatepassNo = "0000000001";
oEntry.PLANT      = "9999";
oModel.update('/ZGPSet(1)', oEntry, null, function(){
alert("Update successful");
},function(){
alert("Update failed");});
control.push(oTable);
control.push(button);
return control;

PUT http://eccdemo.klouddata.com:8001/sap/opu/odata/sap/ZAU_GP_SRV/ZGPSet(1) 400 (Bad Request) datajs.js:17

2014-09-11 20:32:17 The following problem occurred: HTTP request failed400,Bad Request,{"error":{"code":"005056A509B11EE1B9A8FEC11C22778E","message":{"lang":"en","value":"Invalid key predicate type for 'GatepassNo'. Expected type is 'Edm.String'"},"innererror":{"transactionid":"9AC439E49FD8F1EC8FA20050569A24BC","timestamp":"20140911150211.6830000","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"}}}} -  

Accepted Solutions (0)

Answers (1)

Answers (1)

nishantbansal91
Active Contributor
0 Kudos

Hi,

I was trying to update the table using SAPUI5.

But i am facing below error.

first i have created one oModel object.

I am trying to update the one custom table.

Using /iwnfd/maint_service it is working fine,but using eclipse i got the below error.

GatepassNo is the key field for my table.

and plant is the field that i want to change.

(/ZGPSet is the internal table where i am getting all the records. )

In the error Log message is showed  for


"'GatepassNo'. Expected type is 'Edm.String"

What is the meaning of this message.??? Please see my below code.

var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZAU_GP_SRV", true );

Var oEntry = [];

oEntry.GatepassNo = "0000000001";
oEntry.PLANT      = "9999";
oModel.update('/ZGPSet(1)', oEntry, null, function(){
alert("Update successful");
},function(){
alert("Update failed");});
control.push(oTable);
control.push(button);
return control;

PUT http://eccdemo.klouddata.com:8001/sap/opu/odata/sap/ZAU_GP_SRV/ZGPSet(1) 400 (Bad Request) datajs.js:17

2014-09-11 20:32:17 The following problem occurred: HTTP request failed400,Bad Request,{"error":{"code":"005056A509B11EE1B9A8FEC11C22778E","message":{"lang":"en","value":"Invalid key predicate type for 'GatepassNo'. Expected type is 'Edm.String'"},"innererror":{"transactionid":"9AC439E49FD8F1EC8FA20050569A24BC","timestamp":"20140911150211.6830000","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"}}}} - 



Thanks

Nishant