title: How can I consume OData services from my own backend system for a UI5 app?
body: <p>I am new to SAP and currently working on the <a href="https://sapui5.hana.ondemand.com/#/topic/3da5f4be63264db99f2e5b04c5e853db" rel="nofollow noreferrer">walkthrough tutorial</a> of the SAPUI5 documentation and managed to get to Step 26 - <a href="https://sapui5.hana.ondemand.com/#/topic/44062441f3bd4c67a4f665ae362d1109" rel="nofollow noreferrer">Remote OData Service</a>.</p>
  <p>I also wanted to try this step with my own OData service from the backend system that I created for work. I simply replaced the OData service from the tutorial with the service URL of my own OData service plus I created a destination for the ABAP server.</p>
  <p>The code in my <code>manifest.json</code> file:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;dataSources&quot;: {
    &quot;mainService&quot;: {
      &quot;uri&quot;: &quot;server-url/sap/opu/odata/sap/ZDEMO_ODATA_PRACTICE_SRV&quot;,
      &quot;type&quot;: &quot;OData&quot;,
      &quot;settings&quot;: {
        &quot;odataVersion&quot;: &quot;2.0&quot;,
        &quot;localUri&quot;: &quot;localService/metadata.xml&quot;
      }
    }
  }
  </code></pre>
  <pre class="lang-json prettyprint-override"><code>&quot;models&quot;: {
    &quot;&quot;: {
      &quot;dataSource&quot;: &quot;mainService&quot;,
      &quot;preload&quot;: true
    }
  }
  </code></pre>
  <p>I wanted to display the data from the database in a simple list and created following view:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;mvc:View controllerName=&quot;dummyproject.dummyproject.controller.App&quot;
    xmlns:mvc=&quot;sap.ui.core.mvc&quot;
    xmlns=&quot;sap.m&quot;
    displayBlock=&quot;true&quot;&gt;
    &lt;!-- ... --&gt;
    &lt;List items=&quot;{/PersonSet}&quot;&gt;
      &lt;!-- ... --&gt;
    &lt;/List&gt;
    &lt;!-- ... --&gt;
  &lt;/mvc:View&gt;
  </code></pre>
  <p>The connection is working, but I get an empty list on my screen and the following error message:</p>
  <blockquote>
  <p>[ODataMetadata] initial loading of metadata failed</p>
  </blockquote>
  <p>I've already seen error guides that suggest that this error has something to do with same-origin policy but I thought I could resolve it with creating a destination.</p>
  <p>I also checked the OData service itself in the SAP GUI and tested it with the SAP Gateway client, where it works without any problems.</p>
  <p>Does anybody know how to deal with this error or maybe has a clue what I might have done wrong?</p>