Skip to Content

Not able to Perform CRUD operation from UI5

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"); } }); },

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Mar 19 at 10:32 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 19 at 07:27 AM

    console.png

    Hi Anmol,

    Here I am sharing console error. Please help me.

    Regards,

    Mrinal


    console.png (80.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.