Hi Alfonso,
I think in this case you should create a JSON model, add the data from the materiales to this JSON model and then bind the JSON model to your table. Your code would then look something like this:
var materialesModel = new sap.ui.model.json.JSONModel();
this.getView().setModel(materialesModel, "materiales");
oModel.callFunction("Materiales", // function import name
"GET", // http method
{ ProductId : 'AA' }, // function import parameters
null,
function(oData, oResponse) {
console.log(oResponse);
console.log(oData);
materialesModel.setData(oData.results);
alert("ok");
}, // callback function for success
function(oError){
alert("err")
} ); // callback function for error
oModel.refresh(true);
oTable.bindRows("materiales>/");
oTable.placeAt("content");
I always work with XML views so I'm not sure how you have to map the cells to the fields in javascript, but in XML the mapping to a field is like this: {materiales>Name}, so it's possible you'll have to change your javascript code to: template: new sap.ui.commons.TextField().bindProperty("value", "materiales>Name"), but that's something you have to test.