cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Navigations between views

Former Member
0 Kudos

Hi,

I have 10 views in my web dynpro application. Based on the user roles I want to navigate between differnet views. For one user there might be different sequence and for other there might be other sequence.

Please let me know how to dynamiclly navigate from one view to other.

I don't want to create too many outbound plugs for each view and link those with inbound plugs of other views.

Please help.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

check this code to navigate dynamically from one view to other view.Here you no need to declare outbound plugs but you have to give inbound plugs for called views.

give same inbound plug name for all views.

You have to pass following parameters to the Method.

1.window name

2.View usage name( you will get this from window properties)

3.Source plugname(you can give any name)

4.Target view name

5.Target plug name(Give same name to all the views)

method onactiongoto_test .
data:
  l_id type string,
  l_view_controller type ref to if_wd_view_controller,
  l_view_name type string,
  l_nav_services type ref to if_wd_navigation_services,
  l_text type string.

  split id at '__' into l_text l_view_name.
  l_view_name = id.
  l_view_controller = wd_this->wd_get_api( ).
  l_nav_services ?= l_view_controller.

  l_nav_services->do_dynamic_navigation(
      source_window_name        = '<window name>'
      source_vusage_name        = '<View_usage>'
      source_plug_name          =  <OUT_PLUG>
*      PLUG_PARAMETERS           = PLUG_PARAMETERS
*      TARGET_COMPONENT_NAME     = *TARGET_COMPONENT_NAME
*      TARGET_COMPONENT_USAGE    = TARGET_COMPONENT_USAGE
      target_view_name          = <view_name>
      target_plug_name          = 'IN'  "Inbound plug name 
*      TARGET_EMBEDDING_POSITION =  'MAIN/CONTENT'
         ).


endmethod.

Thanks

Suman

Former Member
0 Kudos

Thanks Suman,

Please explain your code a bit.

what this id is all about that you have used with split statement.

I am new to Web dynpro.

and how to get view usage name??

Former Member
0 Kudos

Sorry...

That is used for my purpose.You no need to use.

if you want you can check this standard component

WDR_TEST_TABLE and go to the view MAIN in that check the method onactiongoto_test.

Thanks

Suman

Answers (0)