Hello Adarsh,
code as fallows for binding the table
var service = "sap/opu/odata/sap/z02_cust_srv/";
var oModel = new sap.ui.model.odata.ODataModel("service", false);
sap.ui.getCore().setModel(oModel);
var oTable = new sap.ui.getCore().byId("tab1");
oTable.setModel(oModel);
oTable.bindRows("/z02cust");
It may be helpful for you, If it is not work please share error report.
Thanks
padma