Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3363

No-Access-Control Allow-Origin Header in SAPUI5

$
0
0

Dear All,

 

I am calling the Odata service from my UI5 application and getting the below error like

 

XMLHttpRequest cannot loadhttp://jdb.com:8024//sap/opu/odata/sap/ZMM_PO_GW_SRV/?sap-client=110" No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jdb.com:8024 is therefore not allowed access. The response had HTTP status code 401.

 

But i tried by using the disable of security in Chrome browser. Still getting the same server.

 

But in the console URL is fetching the data from the Backend  . Could you please  help for the above problem.

 

 

var oModel = new sap.ui.model.odata.ODataModel(url,true);

sap.ui.getCore().setModel(oModel);

 

oModel.read('/VendorValidSet', null, ["($filter=PoNumber eq'"+input+"')?sap-client=110"], false, function(oResponse)

{

procType = oResponse.results[0].MessageText;

}

 

Due to above error i am OModel.read is failing and hence not able to load the data from the Backed to the frontend.

 

Thanks for your help.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>