cancel
Showing results for 
Search instead for 
Did you mean: 

linking webdynpro applications

Former Member
0 Kudos

hi,

we develop a roadmap-like wd-application.

Now we have to put a view before the roadmap on which the user must chose from 2 URLlinks where to go next.

The architecture of the whole concept is like this:

we built one wd-project which contains 2 applications with corresponding windows. the roadmap-window contains all the views for the roadmap - the URL-window only one view with the 2 links (some other stuff, too - means, we can't put this view in the roadmapwindow).

The whole webapplication is set up in an EP 6.0.

Now I don't know how to link from the first URLview to the roadmap-application. As URL I tried the EP-iview-preview URL, which is

"http://epserver:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fBONDPortal!2fpoc!2fcom.bondportal.iViews!2fVorgangAnlegen"

this does not work...

I also tried the EP-iview-webdynpro contents url, which is: "local/RoadMap/Roadmap"

when clicking the actual link on the URL view I get a real link:

"http://epserver:50000/webdynpro/resources/sap.com/tcwddispwda/global/SSR/local/RoadMap/Roadmap"

neither of the above works.

Can somebody please help out?

Thanks a lot in advance,

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You may have to use

WDURLGenerator.getApplicationURL(deployableObjectPart, urlParameters);

Refer this document.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/in... in web dynpro.pdf

Hope this helps.

Former Member
0 Kudos

hi,

helpful link - thank you. still i don't really know what is the deployable objectpart. In your mentioned document it says:

<i>To trigger the default operation of a certain business object using the WDPortalNavigation service, you have to use one of the defined navigateToObject() methods. Depending on the signature used, the following parameters are available:

• system

You have to specify the system (alias) to which the business object is assigned. This is a mandatory parameter.

• businessobjType

You have to define the business object using this mandatory parameter.</i>

What I did so far was setting up a string context variable called URL, which shall contain the URL to the next iview. I tried this:

<i>

wdContext.currentContextElement().setURL(WDURLGenerator.getApplicationURL("local/Roadmap/Roadmap"));

</i>

but i run into error "the method getApplicationURL(String String) in the Type WDURLGenerator is not applicable for the arguments (String)".

Do I somehow have to tell my WD to use the WDPortalNavigation?

Thank you in advance,

Matthias

Former Member
0 Kudos

Hi,

Suppose you have two applications then you can create the url using the WDUrlGenerator.

wdThis.wdGet<ComponentContoller>().wdGetAPI().getComponent().getDeployableObjectPart();

This would return the deployable object part for the given component.

Message was edited by: Noufal Kareem

Former Member
0 Kudos

hi,

first, my java is very basic.

so yes - i use two applications and one wdcomponent.

But how do i assign the URL to my UI-Element LinkToUrl?

look:

this works:

wdThis.wdGetRoadmapController().wdGetAPI().getComponent().getDeployableObjectPart();

But already this does not work:

WDURLGenerator.getApplicationURL(wdThis.wdGetRoadmapController().wdGetAPI().getComponent().getDeployableObjectPart());

how do I have to build it all together?

thanx once more,

matthias

Former Member
0 Kudos

Hi Noufal,

if i get this expression:

wdThis.wdGet<ComponentContoller>().wdGetAPI().getComponent().getDeployableObjectPart();

can i then assign the value of it to a context variable?

I thought I must use LinkToURL, which then may get the value of this deployable part - but i get converting errors: mismatch string to deployable...

So, if I get the deployableObjectPart - how can I store it?

I can't put it in a string variable.

matthias

Former Member
0 Kudos

Instead of

wdContext.currentContextElement().setURL(
  WDURLGenerator.getApplicationURL(
    "local/Roadmap/Roadmap"
  )
);

try

wdContext.currentContextElement().setURL(
  WDURLGenerator.getApplicationURL(
    "local/Roadmap", "Roadmap"
  )
);

Armin

Former Member
0 Kudos

WDDeployableObjectPart currentAppPart = wdThis.wdGet<ComponentContoller>().wdGetAPI().getComponent().getDeployableObjectPart();

String a=WDURLGenerator.getApplicationURL(currentAppPart);

Former Member
0 Kudos

Simply wdComponentAPI.getDeployableObjectPart() should also work.

Armin

Former Member
0 Kudos

dear contributors,

so far I tried this in the wdDoInit() method of the view, where I finally want to link to:

WDDeployableObjectPart currentAppPart = 
	wdThis.wdGetRoadmapController().wdGetAPI().getComponent().getDeployableObjectPart();
	try {
		String URL = WDURLGenerator.getApplicationURL(currentAppPart);
		wdContext.currentContextElement().setURL(URL);
	} catch (WDURLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

this gives no sysntax error in NWDevStudio.

then I put the String URL in the context and mapped it to the controller context. Then from my starting application I want to use the Context URL to pass it on to my LinkToURL UI-Element on the starting view.

when I deploy the application with the code above, i get:

<i>WDIllegalArgumentException: Invalid deployable object part type: Component</i>

what went wrong this time? Do I have to put <i>WDDeployableObjectPart currentAppPart</i> elsewhere?

Former Member
0 Kudos

Create an outbound plug in the plugs tab of the view.

then wdthis.wdfire<plugname>(url);

Hope that would work

Former Member
0 Kudos

I doubt the plug thing will work - because I have one wdcomponent - two applications with their own viewsets.

In the application with the starting view i need the addressURL of the next view from another application.

How is that achieved?

Or is that somehow aesier if you create two different wd-projects?

Still the point is, that i put the "getDeployableObjectPart" in the others application startview, which is the one, where I want to link to. When I deploy that application (with the "getDeployableObjectPart") I get the above runtime error.

Never thought that it could be so hard to link two webdynpros!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Use

wdThis.wdGetAPI().getComponent().getApplication().getDeployableObjectPart() .Then get the URL using getApplicationURL.

This will give the current applications URL>

In your case when u need the URL of another application

String depObjectName =

wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();

WDDeployableObjectPart depObjectpart =

WDDeployableObject.getDeployableObjectPart(

depObjectName,

"<application name u want to navigate to>",

WDDeployableObjectPartType.APPLICATION);

String a = WDURLGenerator.getApplicationURL(depObjectPart) ;

Fire exit plug with this String a as the argument.

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Just fire the plug with the Url as a String within.

It will call the second application. That how we do inter-app navigation in webdynpro.

Revert for further clarification

Former Member
0 Kudos

Hi Bharathwaj R, Noufal et al,

thank you for the input - I shall check your proposal.

Right now I implemented a solution, that uses portal navigation like this:

WDPortalNavigation.navigateAbsolute(
	  "ROLES://portal_content/BOND/poc/com.bond.iViews/VorgangAnlegen",
   	
		WDPortalNavigationMode.SHOW_INPLACE,
		(String) null,
		(String) null,

		WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
		(String) null,
		(String) null,
		"firstName=Matthias&lastName=Kasig");

you shall find the tutorial on http://help.sap.com/saphelp_erp2004/helpdata/de/c6/21fc3f82c2e469e10000000a155106/content.htm

here it says you have to declare ep-<i>pages</i> for this goal. apparently it also works with iviews! Concerning pages, which carry the iview I had problem with the layout... (i chose layout: one column - standard) and got a layout which covers the whole width of the screen but is captured in a scrolling frame which is like 4 cm deep, although i set the window height to 800 px.

help in this case is also welcome.

thank you again,

matthias

Former Member
0 Kudos

Hi,

wdDeployableObject will give us the object.To get the URL application we have to make use of URLgenerator's function getApplicationURL which returns a String for a particular deployable object.

Chk this ..

Regards

Bharathwaj

Former Member
0 Kudos

Hi,

Does getApplcation URL throw any exception.Are u printing the String .Print the string which the function applcation URL returns.It should be the application URL

Regards

Bharathwaj