cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XMLHttpRequest cannot load - OData - Javascript - ANALYTIC VIEW

Former Member
0 Likes
452

Hello.

By way of context, am developing an application in javascript (with OData and Rest) and need to see through a table defined in my application, all the information it contains an analytical view, this view is in hana studio as shown in the following image:

Through javascript I call sight, but when I run the application, containing the following code:

The following error is displayed, and not know what to do to continue.

Note:  I have sap is 102 hana Revision 9.2. sap bussines one

Thank you very much in advance to anyone who can assist me.

View Entire Topic
former_member197733
Contributor
0 Likes

Hi Yelson.

For security reasons most browsers block Cross Origin Resource Sharing (a.k.a. CORS) calls.

In other words, an application that is hosted in domain A will be blocked to make calls to domain B if B do not explicitly allows this kind of procedure.

Where is the getVista()? Why don't you put it inside your XS Project so instead of call the ajax to

"https://hanab1:8000/actuprec/hana..." you only point it to the directory your xsodata is "actuprec/odata/..."

This way both caller and called will be on the same domain and your error will be gone.