cancel
Showing results for 
Search instead for 
Did you mean: 

Get WebDynpro Application URL from UICommand

Former Member
0 Kudos

Hi,

i have developed an UICommand wich should open an WebDynpro Application via URL. Does anyone know how can i get the URL of an WebDynpro App in the coding of my UICommand ?

Greetings & thanks

Marcus

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi! Marcus,

The following code might help you...

String deployableObjectName = wdComponentAPI.getDeployableObjectPart).getDeployableObjectName();

try {

WDDeployableObjectPart deployableObjectPart =

WDDeployableObject.getDeployableObjectPart(deployableObjectName,"TargetApp",WDDeployableObjectPartType.APPLICATION);

String urlToTargetApp = WDURLGenerator.getApplicationURLdeployableObjectPart, urlParameter);

} catch (WDURLException exc) {

messageMgr.reportException(exc.getLocalizedMessage(), false);

} catch(WDDeploymentException ex) {

messageMgr.reportException(ex.getLocalizedMessage(), false);

i got this code from one of the Tutorail available on:---

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#12">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#12</a>

Go throught the above tutorial, you will get a fair idea.

regards,

Mithilehwar

former_member751941
Active Contributor
0 Kudos

Hi Marcus,

try {

String linkToBeOpen = "Put your application name here";

IWDWindow window =

wdComponentAPI.getWindowManager().createNonModalExternalWindow(

linkToBeOpen,

"My window title");

window.show();

} catch (RuntimeException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

Regards,

Mithu

Former Member
0 Kudos

Hi,

try{

WDDeployableObjectPart depObj = wdComponentAPI.getDeployableObjectPart();

WDURLGenerator.getApplicationURL(depObj);

}

catch(WDURLException e)

{

//handle the exception

}

Regards

Ayyapparaj

chintan_virani
Active Contributor
0 Kudos

Marcus,

Have a look at this class <a href="https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/services/sal/url/api/IWDURLGenerator.html">here</a>

- Chintan