Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

This blog explains how to navigate from one component view to other component view without adding Used Components.

Scenario: Source component contains View with LinkToAction UI element, on click of this Link navigates to Destination component View without adding Used Component in the Source Component.This is can be achieved using Dynamic Navigation by following interface: IF_WD_NAVIGATION_SERVICES and method: do_dynamic_navigation.

Prerequisites: Should have basic knowledge on Web Dynpro ABAP

Create Two Web Dynpro Component by following

Destination Component :

Create Web Dynpro with View and Window. 

Insert Caption UI Element in the View.

Embed the View into Window.Activate whole component.

Source Component :

Create Web Dynpro with View and Window. See below there is no Used Component,

Insert LinkToAction UI Element in the View and Create Action write the below code assign this action to LinkToAction UI Element.

Code:

  data : lv_view_api type ref to if_wd_view_controller,
         lv_nav_serv type  ref to if_wd_navigation_services.

  lv_view_api = wd_this->wd_get_api( ).
  lv_nav_serv  ?= lv_view_api.

lv_nav_serv->do_dynamic_navigation(
     source_window_name        = 'W_COMP2'
     source_vusage_name        = 'V_COMP2_USAGE_1'
     source_plug_name          = 'DEFAULT'
*     PLUG_PARAMETERS           = PLUG_PARAMETERS
     target_component_name     = 'ZTEST_COMP1'
     target_component_usage    = 'ZTEST_COMP1'
     target_view_name          = 'W_COMP1'
     target_plug_name          = 'DEFAULT'
*     TARGET_EMBEDDING_POSITION = TARGET_EMBEDDING_POSITION
        ).

Embed this View into Window. Activate whole component.

Create the Webdynpro Application by following

Demo : Select the above application Right click and Test. When you clicks on below link it navigates to Destination Components View.

1 Comment
Labels in this area