cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in navigating different component views in the same component view.

Former Member
0 Kudos

Hi Gurus,

My requirement is as follows :

I have to show the different component views in the single component view by using dynamic navigation. I am using the DO_DYNAMIC_METHOD for dynamically navigation.

Now the problem is , I am able to navigate different components views only single time when i tried to navigate the views again it does not show me the destination view. Can anybody have the solution for my problem ?

I am using this code :

Method name : onaction_execute :

DATA :   lv_view_api TYPE REF TO if_wd_view_controller,

             lv_nav_serv TYPE  REF TO if_wd_navigation_services,

             wa_button TYPE ztable_test.

   DATA lo_nd_drop_down TYPE REF TO if_wd_context_node.

   DATA lo_el_drop_down TYPE REF TO if_wd_context_element.

   DATA ls_drop_down TYPE wd_this->element_drop_down.

*  navigate from <CONTEXT> to <DROP_DOWN> via lead selection

   lo_nd_drop_down = wd_context->get_child_node( name = wd_this->wdctx_drop_down ).

   lo_el_drop_down = lo_nd_drop_down->get_element( ).

*  get all declared attributes

   lo_el_drop_down->get_static_attributes(

     IMPORTING

       static_attributes = ls_drop_down ).

   SELECT SINGLE * FROM ztable_test INTO wa_button WHERE button_text = ls_drop_down-elements.

     IF wa_button IS NOT INITIAL.

     lv_view_api = wd_this->wd_get_api( ).

     lv_nav_serv  ?= lv_view_api.

     lv_nav_serv->do_dynamic_navigation(

   source_window_name          = wa_button-window_name

   source_vusage_name          = wa_button-usage_name

   source_plug_name              = wa_button-source_plug

   target_component_name      = wa_button-tar_comp_name

   target_component_usage    = wa_button-tar_comp_usage

   target_view_name              = wa_button-tar_view_name

   target_plug_name              = wa_button-target_plug

   target_embedding_position = 'MAIN_VIEW/VIEW'

      ).

   ENDIF.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member5006
Participant
0 Kudos

Hi  Sourav Jaswal,

Alternate approach for your requirement

1. In main component create a main view and main window (where you navigate to other components view)

2.Go to View layout --> create contextual panel and view container

3. In contextual panel  create areas and insert buttons in it.

     create outbound plug for each button and fire outbound in every action..

4. Reuse  all the webdynpro components that you want to display in main comp.

5.Go to main window controller and embed all required views into  view controller

6.Maintain navigation from outbound plugs to each view of  embedded handle_default plug.

Regards,

Naveen M