on 05-25-2021 4:02 PM
HI Guys,
Am developing an SAP UI5 application and deploying and running on my Portal server with url as shown below
https://portahost:50000/irj/portal
I wanted to consume odata service from my ecc system whose URL is as below.
https://ecchost:50300/sap/opu/sap/opu/odata/sap/Z***********_SRV/P**T*_M********R_V**********t/.
on executing below code am getting error
var odataserviceURL = 'https://ecchost:50300/sap/opu/sap/opu/odata/sap/Z***********_SRV/P**T*_M********R_V**********t/.';
var OdataModel = new sap.ui.model.odata.v2.ODataModel(odataserviceURL);
am getting below error , kindly let me know how to resolve this issue.
Access to XMLHttpRequest at 'https://c***********.com:50200/sap/opu/odata/sap/Z****V/P*t/$metadata' from origin 'https://de****.l*******o.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Regards
Govardan
normally if your app is hosted in hostA, it can only access the service on hostA,
in your case, you need web dispatcher to route the ecc service to abap server
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.