Skip to Content

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

Access denied Error for sap-ui-core.js in IE8 !

Hi All

I am developing a SAPUI5 application hosted on a local installation (localhost) of Tomcat server, trying to display all the sales order from the SAP ES Workplace ERP system using the SAP Demo Gateway services provided...

I am using the following REST service to fetch all Sales Order -

My HTML5 application is running on the local host..But when I try to run this on IE8, gives me a Access denied

But the sap-ui-core.js is indeed placed under the location mentioned above..If I write a simple application which only display some text, the same code works.

Here is the HTML code I have written

<!DOCTYPE html>



        <meta http-equiv='X-UA-Compatible' content='IE=edge' />

        <title>Fetch Sales Order via Gateway - SAPUI5</title>

        <script id="sap-ui-bootstrap"




           data-sap-ui-libs="sap.ui.commons, sap.ui.table">

           document.domain = '*'


        <script src="scripts/fetchsalesorder_new.js"></script>


    <body class="sapUiBody">

    <div id="salesorders"></div>

        <div id="lineitems"></div>



And the snippet of the script file

//supress the Same Origin Policy on IE8 & Chrome

var domainString = "document.domain";

domainstring = "*.com"

'Access-Control-Allow-Origin: *'

'Access-Control-Allow-Headers: X-KEY'

var ODataModel = sap.ui.model.odata.ODataModel

var salesOrderService =


username = "GW@ESW",

   password = "ESW4GW",

oModel = new sap.ui.model.odata.ODataModel("")

asJson = false,

salesOrderCollection = "SOHeader";

var salesDetailsTable = new sap.ui.table.DataTable({

   title : "Available Sales Order",

   width : "100%",

   visibleRowCount : 5,

   ExpandedVisibleRowCount : 20,

   selectionMode : sap.ui.table.SelectionMode.Single,

   editable : false


// connect the data table to the SalesOrder service



//place table at the div element


What could be the issue here??

Appreciate any help.




Hi Madhumitha,

I recommend to make use of the UI5 Simple Proxy servlet for local testing purposes while complying with the same origin policy. 

Have a look at the corresponding section in my UI5 on Gateway end-to-end tutorial New E2E Tutorial: Gain Hands-on Developer Experience with SAPUI5 and SAP NetWeaver Gateway. It shows how to ...

  • call and address a Gateway OData service in your UI5 app
  • use the UI5 simple proxy servlet for local testing (to comply with the same origin policy)
  • configure the web.xml file with its parameter needed fro the UI5 proxy servlet
  • implement a getUrl() helper method to get different Gateway service URLs for local testing versus running the UI5 app on the ABAP server.

Regards, Bertram

1 View this answer in context

Helpful Answer

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