hi sapui5 experts
I'm trying to send the data I have in a table to my odata services but I don't kwon how to send it... ![]()
this is my code:
var oSaberAll = []; var oSaber = {}; var oTable = oView.byId("oTbMaterias"); var oLIMaterias = oTable.getItems(); $.each(oLIMaterias, function(index,oMateria){ console.log(oMateria); var oCells = oMateria.getAggregation("cells"); var sNomMateria = oCells[0].mProperties.text; var sCodMateria = oCells[1].mProperties.text; var sPuntMateria = oCells[2].mProperties.text; oSaber.Id = oView.byId("oINumEst").getValue(); oSaber.Type = oView.byId("oSTipId").getSelectedItem().getKey(); oSaber.Subtestid = sCodMateria; oSaber.Subtestres = sPuntMateria; oSaberAll.push(oSaber); }); oSaberAll.Id = oView.byId("oINumEst").getValue(); oSaberAll.Type = oView.byId("oSTipId").getSelectedItem().getKey();
oModel.create("Saber11Set", oSaberAll, null, function(oData, oResponse) { sap.m.MessageToast.show("Datos guardados correctamente!"); console.log(oData); }, function(oData, oResponse) { aSaveEstudio = false; sap.m.MessageToast.show("Error"); console.log(oData); });
and here is my Odata entityset
and I get an error in the gateway log that says "Error while parsing an XML stream"
any would be apreciate ![]()
thanks in advance
