Skip to Content
Nov 11, 2019 at 10:20 AM

UI5 Application , cannot consume data from SAP PO Rest API

194 Views Last edit Nov 11, 2019 at 11:30 AM 2 rev


I am calling a rest web service created in SAP PO, from a UI5 app created in NWDS.

The code is as follows:

$.ajax({ url: "http://<server>:<port>/RESTAdapter/checkvendorexistence?vendornumber=<value>?anycode=value",
type: "GET",
crossDomain: true,
//data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
success: function (response) {
var resp = JSON.parse(response);


error: function (xhr, status) {

alert("error"); } });

In chrome, I am getting status 200 OK, and in SAP PO monitoring, I am getting the request and response. But the alert i get is of error function. Where am I going wrong?

Any guidance would be useful.