title: Odata Error - Failed to execute 'send' on 'XMLHttpRequest': Failed to load (SAP)
body: <p>I am trying to consume an ODATA service with my UI5 App. I have created a simple table and the ODATA services in the ERP backend. When I am testing the services it is working fine, I can see the metadata and also the JSON. However when I am running my app( Web Preview ) it gives me following error.</p>
  
  <p><strong>Uncaught (in promise) Object
  Failed to load resource: the server responded with a status of 404 (Not Found)</strong>.
  "Failed to execute 'send' on 'XMLHttpRequest': Failed to load <strong>"'<a href="https://Username:password" rel="nofollow">https://Username:password</a>"ERP System info":"port"/sap/opu/odata/sap/"my Odata service name"/$metadata'"</strong></p>
  
  <p>When I run my application on ABAP server it works fine.
  Here is the code for ODATA in the controller.</p>
  
  <p>var sServiceUrl = "https://"ERP System info":"port"/sap/opu/odata/sap/"my Odata service name"/";</p>
  
  <p>var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, false,
           "Username", "Password");</p>
  
  <p>Any pointers will be helpful.</p>