cancel
Showing results for 
Search instead for 
Did you mean: 

How can i tell if my UI5 application is running on SAP or on my local pc

Former Member
0 Kudos

How can i tell if my UI5 application is running on SAP or on my local development environment localhost (tomcat)

when i am in development mode i want my target service urls to be specific

var sServiceUrl = "http://myserver:8010/sap/opu/odata/sap/ZPM_HD_SRV?sap-client=130";

but when from server to ge generic:

var sServiceUrl = "../../../../opu/odata/sap/ZPM_HD_SRV/";

View Entire Topic
junwu
Active Contributor

if (window.location.hostname == "localhost") {
serviceurl= "../proxy" + serviceurl;
} else {

}