Skip to Content
avatar image
Former Member

API to get current BO server name?

Hi All,

I'm trying to retrieve the SID of the current BO server that my design studio application is run against.

I tried using xxx.getInfo().system, but this returns the CUID.

My BO administrator has set the CUID for all our BO servers to be one and the same in all systems in the BO landscape (DEV, QA, PROD).

So, is there an alternative to retrieving the SID? I just need some way to identify which server my design studio application has been executed on.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    May 26, 2015 at 07:28 AM

    Hi an alternative is to create a small SDK to get the URL + portnumber from the current session. I assume the different systems have each their own hostname and/or portnumber

    the SDK could look like this :

    sap.designstudio.sdk.Component.subclass("com.mycompanyname.sdkcomponents.applicationInfo", function() {
    var currenthostname = undefined;
    var currenturl = undefined;
    var that = this;
    this.currenthost=function(e){if(e===undefined){return currenthostname;}else{return this;}};
    this.URL=function(e){if(e===undefined){return currenturl;}else{return this;}};       
    
    this.init = function() { 
    currenturl = location.href;
    currenthostname = location.hostname;
    that.firePropertiesChanged(["currenthost", "URL"]);
     };
    });
    

    with a standard ZTL script you can retrieve the hostname and deduce the server.

    best regards,

    Jeroen

    Add comment
    10|10000 characters needed characters exceeded