Wd Parameter Passing

The Navigation between two different Web Dynpro Applications can be triggered by declaring an Exit Plug inside the Interface View Controller of Application 'StartApp' with a parameter named 'Url' of type string.

The Url-parameter contains the qualified Url of the target Application belonging to the target component (may be the same like the start comp).

For being able to fire this exit plug, a view controller must first declare a controller usage for the Component Interface View Controller:


The url to Application 'AnotherApp' can be retrieved by calling

WDURLGenerator.getApplicationURL("local/WebDynpro_InterAppsNavigation", "AnotherApp")

for a local DC, otherwise "com.sap/WebDynpro_InterAppsNav"

A URL-Parameter can easily be added to this URL by simple string concatenation: urlToAnotherApp+="?app.parameter="+paramterValue;

So the caller transfers the paramter via URL. The target (here the Startup-Plug-Eventhandler inside InterfaceViewController of 'AnotherApp'
('AnotherApp' must declare which startup-plug of which Interface View has to be used)) receives this URL parameter in an additional Startup-Plug parameter named e.g. 'parameter'. Because the URL-parameter was added following the notation app.<parameter-name> (important is the 'app.'-prefix) the target startup-plug eventhandler automatically gets the parameter (contained in URL) when it is called.

For accessing this received parameter-value inside the view controller you can map a context attribute to another one inside the component controller context. This context can be accessed by the interface view controller (with the startup-plug eventhandler) after having declared a component usage of the component controller.

In the inbound-plug (of type startup-plug) of the target interface view of 'AnotherApp) you then can store the received parameter in the component controller context via
wdThis.wdGet<Component Controller>.wdGetContext().currentContextElement().setReceivedParameter(parameter);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License