cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA - Access Control Allow Orgin

venkateswaran_k
Active Contributor
0 Kudos

Dear All

I have created a ODATA service and activated. 

Can you help me to set the

Access-Control-Allow-Orgin Parameter : "*"  in the request Header method of the service.

In which method, i should implement and how to.  Kindly help me

The reason is The service is blocked it from any http://localhost.... 

Regards,

Venkat

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

the error that you gave is not because of your odata. It is a security policy that all modern browser does. For testing purpose you can open your chrome disable web security as below link describe, http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome

EkanshCapgemini
Active Contributor
0 Kudos

Hi Venkat,

You may follow this blog for

In short, you need to set the required header and value in /IWBEP/IF_MGW_CONV_SRV_RUNTIME~SET_HEADER method of you DPC_EXT class.

Regards,

Ekansh

venkateswaran_k
Active Contributor
0 Kudos

Hi Ekansh

I created the project ZGL2 -

A service implemented GLListSet - mapped to a RFC function that returns list of GLs from SKAT table.

There is class created as below : ZCL_ZGL2_DPC_EXT

Inside that the method created as GLLISTSET_GET_ENTITYSET

Do I need to put my header value in this method ?

I attach the screenshot