Skip to Content
0
Jan 04, 2023 at 01:08 PM

Not able to connect from SAP Fiori to SAP CPI in SAP BAS

241 Views

Hi,

we have a requirement to get data in fiori application from CPI. We are going to deploy this app on On-Premise system.

while performing Ajax call I'm getting 401 error.

errorcors.png

error.png

If I double-click on this link, I can can get the data in browser.

Following is my Ajax call in controller

ajaxcall.png

I try adding this URL "https://cors-anywhere.herokuapp.com" with my CPI link but it's not working, here I get 401 Unauthorized error. and if I execute this link in browser I get "Missing required request header. Must specify one of: origin,x-requested-with

Also I add chrome extension for CORS, it is also not working.

Any help would be much appreciated.

Regards,

Priyanka

Attachments

error.png (9.8 kB)
errorcors.png (11.7 kB)
ajaxcall.png (33.4 kB)