Skip to Content
author's profile photo Former Member
Former Member

post(create) Odata model - HTTP request failed404

Hello, everyone!

I have a problem with post method in sap.

I use Odata model:

var sServiceUrl = "/sap/opu/odata/SAP/Z_RYP_SRV/";
var oModelCreate = new sap.ui.model.odata.v2.ODataModel(sServiceUrl, true, "888", "8888" );

When I try to do post query I get error.

The following problem occurred: HTTP request failed404,Not Found,{"error":{"code":"005056A509B11EE1B9A8FEC11C21D78E"
,"message":{"lang":"ru","value":"Resource not found for the segment 'sap'."}
,"innererror":{"transactionid":"576A38D4666B2310E1000000C0A805DC","timestamp":"20160628143602.8293510","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
"SAP_Note":"See SAP Note 1797736 for error analysis ("}}}}

I use this code

onCreatePost: function() {
         var oEntry = {};
         oEntry.Name = "Peter";
             var sServiceUrl =  = "/sap/opu/odata/SAP/Z_RYP_SRV/"
         var oModelCreate = new sap.ui.model.odata.v2.ODataModel( sServiceUrl );
          oModelCreate.create('/sap/opu/odata/SAP//sap/opu/odata/SAP/Z_RYP_SRV//EtSet', oEntry, null );

Could you help me deecide it problem?!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 28, 2016 at 04:33 PM

    Your create path is incorrect, should be something like

    oModelCreate.create('/EtSet', oEntry, null ...


    OData Write Support - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library



    SAP - Technology RIG

    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.