cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to Perform CRUD operation from UI5

0 Kudos

Hello Every one,

Not able to update database table from webide to SAP Table through odata model, Even though its working fine on Gateway server and I checked connection also,that is also successfull. Sharing the code .

onCreate:function(){

var empid = this.getView().byId("idEmpID").getValue();

var empname = this.getView().byId("idEmpName").getValue();

var empdesig = this.getView().byId("idEmpDesig").getValue();

var emploc = this.getView().byId("idEmpLoc").getValue();

var empmail = this.getView().byId("idEmpMail").getValue();

var emppin = this.getView().byId("idEmpPin").getValue();

var empage = this.getView().byId("idEmpAge").getValue();

var jData = {

Empid : empid,

Empname: empname,

Empdesig: empdesig,

Emploc:emploc,

Empmail:empmail,

Emppin:emppin,

Empage: empage

};

var oData = this.getView().getModel();

oData.create("/empSet",jData,{

success:function(req, res){

MessageBox.show("New Employee has been Created Successfully",MessageBox.Icon.SUCCESS,"SUCCESS");

},

error:function(error){

MessageBox.show(error,MessageBox.Icon.ERROR,"ERROR"); } }); },

former_member540067
Active Participant

Check console for errors. Please post the error for better solution.

smarchesini
Active Contributor
0 Kudos

could we see the network error ?
and the batch call ?

Accepted Solutions (0)

Answers (2)

Answers (2)

saurabh_vakil
Active Contributor

Your POST operation call is throwing a 500 error. You need to check the gateway error log/backend error log and analyze the cause of this error.

0 Kudos

Hi Saurabh,

But I check my backend Gateway Server. Its working fine and connection is also successful. Any other suggestion ?

Regards,

Mrinal

saurabh_vakil
Active Contributor
0 Kudos

This is most probably not about a connection problem. A 500 HTTP request failed error clearly indicates that something went wrong with the POST operation of your service. Check transaction /IWFND/ERROR_LOG to see a more detailed description of the error.

0 Kudos

console.png

Hi Anmol,

Here I am sharing console error. Please help me.

Regards,

Mrinal