cancel
Showing results for 
Search instead for 
Did you mean: 

Too much navigation links due to interconnected views

Former Member
0 Kudos

Hi,

Being relatively new to ABAP WebDynpro I am tring to write an application in a NW 2004s system which consists of a main view and several utility programs each in their own view. All views are stored in a single window.

I want to create a single menu to jump to each view. This menu should be accessibly from each view, so you can navigate directly from any view to any other view. Since every menu item contains an instruction to fire a different outbound plug, and every screen has its own inbound plug, the number of navigation links rapidly increases with the number of screens. In fact the number of navigation links L = 2 * (V !) ( where V is the number of views ).

I know you could make a master menu in the main view that contains the navigation to other, secundary views. In the secundary view you could only go back to the master menu. So access from one secundary view to another one can only flow via the master menu. But I would like to have the more direct access possibility between views.

Is there another way to navigate between these views without the need to create a huge amount of static navigation links ?

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm not sure why you don't want the to place the navigation menu in the master frame and then just embed your application views within a ViewContainerUI element. That is generally how this is done. It simplifies the logic of the inner views and reduces the longer term maintenance.

However if you don't want to define navigation links - regardless of the structure - you can always do dynamic navigation.

data:
    l_api_main type ref to if_wd_view_controller.

  data: target_component_name type string,
        target_view_name      type string,
        source_plug_name      type string.

      target_view_name      = 'LOCAL_TEST'.
      source_plug_name      = 'OUT_PLUG6'.

  l_api_main = wd_this->wd_get_api( ).
    try.
        l_api_main->do_dynamic_navigation(
            source_window_name        = 'MAIN'
            source_vusage_name        = 'MAIN_VIEW_USAGE_1'
            source_plug_name          = source_plug_name
            target_view_name          = target_view_name
            target_plug_name          = 'DEFAULT'
            target_embedding_position = 'MAIN_VIEW/VIEW_CONTAINER').

You do have to supply a Plug Name, but it doesn't have to be defined in the view or the window at design time.

Former Member
0 Kudos

Hi Thomas,

Thanks for your answer, which helped me very much.

After studying WDR_TEST_NAVIGATION, I now realize what I did wrong.

Instead of a main view ( with the menu ) with a view container holding the secunday views, I had done the opposite and embedded the main view in every secunday view.

Regards,

Fred

Answers (0)