Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Uncaught SyntaxError: Unexpected token

Hii ,

I am trying to bind my table with odata service in index.html. I am using the following code:

  var tableo = new sap.ui.table.Table({

  title : "Indian Cricket Team",

  visibleRowCount : 5,

  selectionMode : sap.ui.table.SelectionMode.Single

  });

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Sr No."}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Srno"),

  width: "200px"

  }));

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Player"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Player"),

  width: "200px"

  }));

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Age"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Age"),

  width: "200px"

  }));

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Country"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Country"),

  width: "200px"

  }));

  tableo.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Email"}),

  template: new sap.ui.commons.TextView().bindProperty("value", "Email"),

  width: "200px"

  }));

  var odatao = new sap.ui.model.odata.ODataModel({

  '/sap/opu/odata/sap/ZODATA_TEAM_SRV',

  false,

  "userid",

  "password"

  });

  tableo.setModel(odatao);

  tableo.bindRows("/zteam_enity_typeSet");

  tableo.placeAt("content");

But when i rumn this in chrome Browser It is showing the Uncaught SyntaxError: Unexpected token . And odata service is working properly in gateway client.

Please Help.

Former Member
Not what you were looking for? View more on this topic or Ask a question