Skip to Content

Issues in Posting Data

Hi all,

I tried this code for posting data but its not working i'm getting error like Method 'POSTADVERTSET_CREATE_ENTITY' not implemented in data provider class. Any other code i missed here. please correct it.. Thanks in advance.

CODE:

Posdata: function(evt){

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

var vProperties = {};

vProperties.Offid="0000366";

vProperties.Rcins="00000043";

vProperties.Pbdat="2015-07-30T00:00:00";

vProperties.Vldat="2015-07-30T00:00:00";

vProperties.Pcost="300";

vProperties.Idtxt="ODATA TEST";

vProperties.Curry="USD";

//vProperties.Id = 0;

oModel.createEntry("PostAdvertSet", vProperties);

oModel.submitChanges(this._fnSuccess, this._fnError);

oModel.refresh();

},

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 12, 2015 at 07:54 AM

    Hello Vinothkumar,

    the error message point pretty clear to the error. For your OData service in the backend the method for the POST functionality is not implemented. Please implement it or talk to your backend development team regarding the implementation.

    Best Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Florian Pfeffer,

      This is my code using in the controller.js file.

      CODE:

      onInit : function(evt) {

      this.getView().addDelegate(

      {

      onBeforeShow : function(evt) {

      var oModel3 = new sap.ui.model.odata.ODataModel(

      "{/PostAdvertSet}");

      evt.to.setModel(oModel3);

      }

      });

      },

      Posdata:function(){

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

      var vProperties = {};

      vProperties.Offid="";

      vProperties.Rcins="00000043";

      vProperties.Pbdat="2015-09-25T00:00:00";

      vProperties.Vldat="2015-09-25T00:00:00";

      vProperties.Idtxt="Manager Post";

      vProperties.Pcost="120.00";

      vProperties.Curry="USD";

      oModel3.createEntry("/PostAdvertSet", vProperties);

      oModel3.submitChanges(this._fnSuccess, this._fnError);

      oModel3.refresh();

      }

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.