Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

override default view with dynamic navigation


I have an URL parameter, based on what I do a dynamic navigation

wd_this->wd_get_api( )->if_wd_navigation_services~do_dynamic_navigation()

in the WINDOW DEFAULT inbound plug.

However the navigation is overridden by what is set as a default view in the WINDOW tab.

I tried

      lr_window_controller = wd_this->wd_get_api( )->get_embedding_window_ctlr( ).
       lr_rr_window = lr_window_controller->get_window_info( ).
       lr_view_usage = lr_rr_window->get_view_usage( 'MAIN_USAGE_0' ).
       lr_view_cnt_assignment = lr_view_usage->get_view_cnt_assignment( 'FUNC_VCA_1' ).
       lr_view_cnt_assignment->set_default_view_usage( 'NOTDEFAULTVIEW_USAGE_1' ).

but not helping, still the default view is appearing. FUNC_VCA_1 in the above code is a view_container, I am trying to set a view active inside that view container.

Any ideas?




When system reaches the DEFAULT plug, this is the first point of entry for the application and no views exist at this point of time.

I suggest you the below approach:

  • Create a global attributes at component controller and store the required url information / view/plug name to be triggered inside DEFAULT plug
  • Create one MAIN_VIEW which is default in this case
  • Let us say you have other views VIEW_A, VIEW_B, etc
  • As MAIN_VIEW set as default, the WDDOINIT( ) method triggers, now you can navigate to required view based on global attributes values

Hope this helps you.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question