are you using eclipse or webide?
"/sap/opu/odata/sap/<Odata service name>" is a valid URL only if you run you SAPUI5 app on the same server as your OData service.
for local eclipse you have to configure proxy (in web.xml)
<servlet>
<servlet-name>SimpleProxyServlet</servlet-name>
<servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>
<init-param>
<param-name>com.sap.ui5.proxy.REMOTE_LOCATION</param-name>
<param-value>http://<YOUR_GATEWAY></param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>SimpleProxyServlet</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
new sap.ui.model.odata.ODataModel("proxy" + "/sap/opu/odata/sap/<Odata service name>");
and for webide you have to configure destination and and add a mapping in neo-app.json
{
"path": "/sap/opu/odata",
"target": {
"type": "destination",
"name": "XXX_GW",
"entryPath": "/sap/opu/odata"
},
"description": "Target OData system"
},