
Interface IF_WD_NAVIGATION_SERVICES_NEW allows you to create the metadata required for dynamic navigation. This makes a declaration of navigations links at design time unnecessary. However, this should only be done if a static declaration of the navigation links is not possible. This may be the case if, for example, it only becomes known at runtime (possibly as a result of how the Web Dynpro component has been configured) which views or interfaces from embedded components are to be displayed.
Interface IF_WD_NAVIGATION_SERVICES_NEW can be accessed from a view in a Web Dynpro component as follows:
data: l_view_api type ref to if_wd_view_controller, l_navigation_services_new type ref to if_wd_navigation_services_new. l_view_api = wd_this->wd_get_api( ). L_navigation_services_new ?= l_api.
PREPARE_DYNAMIC_NAVIGATION
This method creates a navigation link and a navigation target for the specified parameters. All the necessary view embeddings and view container assignments are created at the same time. If the target view comes from an embedded component, if necessary, the component usage is created. After this method has been called navigation can be performed by activating the outbound plug specified in SOURCE_PLUG_NAME.
Calling this method also causes an object of type IF_WD_REPOSITORY_HANDLE to be created, which is returned to the caller. This object allows access to the metadata dynamically created when the method was called.
Repeated calls to this method using the same outbound plug (SOURCE_PLUG_NAME) results in multiple navigation links being created to this outbound plug. As all these navigation links are followed during the navigation phase, this might cause a view other than the anticipated view to be displayed.
The following import parameters exist:
Name of the window in which the navigation is performed This is the window, in which the start and target views are embedded.
Name of the view usage for the start view (see window editor)
Name of the outbound plug
Name of the target component, that is the view to be displayed in the internal window.
Name of the target view to be navigated to
Name of the inbound plug
Embedding position of the view in the format:
[<View1>/ <Container1>.[<View2>/<Container2>]*].
If this parameter is set to initial, the view to be navigated to will be directly embedded in the window.
The following return parameters exist:
Handle in which the generated meta data can be accessed.
DO_DYNAMIC_NAVIGATION
Dynamic navigation is performed. To do this, the navigation link, navigation target, outbound plug, component usage, view embeddings, and view container components are created - provided that they do not already exist - for the navigation target. The navigation is then performed.
Calling this method also causes an object of type IF_WD_REPOSITORY_HANDLE to be created, which is returned to the caller. This object allows access to the metadata dynamically created when the method was called.
Repeated calls to this method using the same outbound plug (SOURCE_PLUG_NAME) results in multiple navigation links being created to this outbound plug. As all these navigation links are followed during the navigation phase, this might cause a view other than the anticipated view to be displayed.
The following import parameters exist:
Name of the window in which the navigation is performed This is the window, in which the start and target views are embedded.
Name of the start view embedding
Name of the outbound plug
List of parameter values in the outbound plug
Name of the target component, that is the view to be displayed in the internal window.
Name of the target view to be navigated to
Name of the inbound plug
Embedding position of the view in the format:
[<View1>/ <Container1>.[<View2>/<Container2>]*].
If this parameter is set to initial, the view to be navigated to will be directly embedded in the window.
The following return parameters exist:
Handle in which the generated meta data can be accessed.