Dear All,
I have created a fully customized app using SAPWeb IDE.
My Requirement is upon Button Click to get details (ex : purchase order) using oData. below is the code
View1.Controller.js
GetDetails: function() {
var serviceURI = "proxy/http/<IP-PORT>/sap/opu/odata/sap/ZPO_SRV/PO_HEADER_SET('2100002475')?$expand=PO_Navigation/POCOND_NAVI";
OData.request({
requestUri: serviceURI,
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"X-CSRF-Token": "Fetch"
},
method: "GET",
user: "UserName",
password: "PW",
recognizeDates: true,
}
}
But always returning
(No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:50172' is therefore not allowed access. The response had HTTP status code 401)
or 403 - Forbidden
Can you plz help