Skip to Content
May 17, 2018 at 06:44 PM

Bad request from sapui5 odata

2509 Views Last edit May 17, 2018 at 09:25 PM 3 rev

Hello community,

Right now i'm triying to create an entry, well i'm jus testing that my odata is receiving the info, so i create an odata with my entity CrearSet and activate the check of creatable, put some break-points to debugg when my app sapui5 send the info but is not receiving nothing

now, this is my controller/function that fire my event/odata i'm using odata v2

// "sap/ui/model/odata/v2/ODataModel",
function(Jquery, Controller, MessageToast, JSONModel, ODataModel, ManagedObject, validRut, ODataModeII) {

onCrear : function() {
    var mensajeOkCreado = this.byId("mensajeOkCreado");
    var mensajeNotCreado = this.byId("mensajeOkCreado");
    var sURI = "/sap/opu/odata/sap/ZCRM_UX_PROSPECTO_SRV";
    var oModel = new ODataModeII(sURI, true); 
    var oDatosRespuesta = new JSONModel();
    var oInfo = {};
    oInfo.rut       = this.byId("crearRut").getValue();
    oInfo.nombres   = this.byId("crearNombres").getValue();
    oInfo.apellidos = this.byId("crearApellidos").getValue();
    oInfo.calle     = this.byId("crearDir1").getValue();
    oInfo.numero    = this.byId("crearDir2").getValue();
    oInfo.depto     = this.byId("crearDir3").getValue();
    oInfo.comuna    = this.byId("crearDir4").getValue();
    oInfo.fijo      = this.byId("crearTlf1").getValue();
    oInfo.movil     = this.byId("crearTlf2").getValue();     = this.byId("crearMail").getValue();
    oModel.create("/CrearSet", oInfo, {
          method: "POST",
          success: function(data) {
          error: function(oError) { 


So i got this error:

The following problem occurred: 
HTTP request failed400,Bad Request,
       "message":{"lang":"es","value":"Property 'rut' is invalid"},

"Error_Resolution":{"SAP_Transaction":"For backend administrators: 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 ("},"errordetails":[]}}} - 

this is how i configured my odata:


i follow this tutorial :


properties.png (42.6 kB)
entityset.png (22.6 kB)
method-used.png (7.5 kB)
code-method.png (47.6 kB)