cancel
Showing results for 
Search instead for 
Did you mean: 

How to Start/Launch another WD application using a link.

0 Kudos

Hi, I've been trying to see if there's an official way that I can launch another WD application using a link from within an application where the applications are not in the same deployable object.

P.S. I've seen the other thread of how to do it when the applications are within the same deployable object.

Thanks in advance as always,

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Stefan,

Thank you for responding. Essentially what I want to be able to do is to launch an application that is deployed on the same server at the customer. I will not know the name of the server in advance obviously, but I will know the name of the application that I would like to launch.

Does this make sense?

Thanks again,

Former Member
0 Kudos

Hi Michael,

of course it does, so the question should be:

"Hey, how do it get the application URL of a WD application without hardcoding the server name, port or whatever?"

This is simple:

  /**
   * Return is the application URL for the specified <code>deployableObjectPart</code> with appended  
   * URL parameters given by <code>urlParameters</code>. All key/value pairs in the map must 
   * be of type java.lang.String.
   * 
   * @param deployableObjectPart a deployable object part representing a Web Dynpro application 
   * @param urlParameters key/value pairs added as URL parameters; they must be of type String
   * @return the application URL for the specified <code>deployableObjectPart</code> with appended  
   * URL parameters given by <code>urlParameters</code>
   * @throws WDURLException if the URL couldn't be generated 
   * @see com.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator#getApplicationURL(WDDeployableObjectPart)
   */
  public static String getApplicationURL(WDDeployableObjectPart deployableObjectPart, Map urlParameters) throws WDURLException {
    return AbstractManager
      .getServerPlatformImplementation()
      .getURLGeneratorFactory()
      .getURLGenerator()
      .getApplicationURL(deployableObjectPart, urlParameters);       
  }

or if you would like to get it load balanced:

  /**
   * Return is the workload balanced application URL for the specified <code>deployableObjectPart</code> with appended  
   * URL parameters given by <code>urlParameters</code>. All key/value pairs in the map must 
   * be of type java.lang.String.
   * 
   * @param deployableObjectPart a deployable object part representing a Web Dynpro application 
   * @param urlParameters key/value pairs added as URL parameters; they must be of type String
   * @return the workload balanced application URL for the specified 
   * <code>deployableObjectPart</code> with appended URL parameters given by <code>urlParameters</code>
   * @throws WDURLException if the URL couldn't be generated 
   * @see com.sap.tc.webdynpro.services.sal.url.api.WDURLGenerator#getWorkloadBalancedApplicationURL(WDDeployableObjectPart)
   */  
  public static String getWorkloadBalancedApplicationURL(WDDeployableObjectPart deployableObjectPart, Map urlParameters) throws WDURLException {
    return AbstractManager
      .getServerPlatformImplementation()
      .getURLGeneratorFactory()
      .getURLGenerator()
      .getWorkloadBalancedApplicationURL(deployableObjectPart, urlParameters);      
  }

Before i forget it to mention, these are two methods of the WDURLGenerator API. There are others where you don't have to specify the deployableObjectPart, you can use DPO name and name of application as parameters instead.

Hope that helps.

Best regards

Stefan

PS: This was my 2nd attempt, i hope i got you right now...

Former Member
0 Kudos

Hi Michael,

to be honest, i don't understand the problem. A WD application is represented by an URL, so you can set the source of the link to this application URL.

It doesn't matter, if the application is part of the current or another deployable object.

Or did i get you wrong?

Best regards

Stefan