cancel
Showing results for 
Search instead for 
Did you mean: 

How to Navigate between two windows in webdynpro

Former Member
0 Kudos

hi experts...

My requirement is to navigate from pop window to my main window.

When i click the action" NO " button from my pop up screen it has to be navigated to second view in my main window.

How to create navigation plug between second view and the popup window. 

regards,

bala..

Accepted Solutions (1)

Accepted Solutions (1)

former_member187651
Active Participant
0 Kudos

Hello Subramani,

Proceed as below:

1. Create one Window: say 'W_popup' (used for POPUP)

2. Create one View: say V_popup

3. Embed the view with window the Window controller.

4. Use the code below to open the popup from main window say: W_parent

---- Write this code in the method or action on which you need to open the popup

data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component  type ref to if_wd_component.
data lo_window         type ref to if_wd_window.
data: lr_view_controller type ref to if_wd_view_controller.

lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window         = lo_window_manager->create_window(
                    window_name            = 'W_popup'
*                  title                  =
*                  close_in_any_case      = abap_true
                    message_display_mode   = if_wd_window=>co_msg_display_mode_selected
*                   close_button           = abap_true
*                   button_kind            = if_wd_window=>co_buttons_okClose
                    button_kind            = if_wd_window=>CO_BUTTONS_OKCANCEL
                    message_type           = if_wd_window=>co_msg_type_none
*                   default_button         = if_wd_window=>co_button_ok
                    ).
wd_comp_controller->go_window = lo_window.

   lr_view_controller = wd_this->wd_get_api( ).
   lo_window->subscribe_to_button_event(
   button = if_wd_window=>co_button_ok
   button_text = 'Confirm'
   action_name = 'Action_navigate'
   action_view = lr_view_controller ).

*wd_comp_controller->go_window = lo_window.
lo_window->open( ).

********************************

5. Create one action in parent window, calling view say:
Action_navigate

6. You will get your control in action : 'Action_navigate' with click on Confirm button of POPUP.

7. Like you can create on cancel button, with action in view.

Hope this solve your problem.

Regards,

Chandan

Former Member
0 Kudos

thanks chandan...

It was really helpful..

Answers (2)

Answers (2)

former_member197475
Active Contributor
0 Kudos

Bala,

Pleas follow the below links.

http://wiki.scn.sap.com/wiki/display/WDABAP/Web+Dynpro+application+to+display+a+Pop-up+window+on+the...

http://scn.sap.com/thread/1972884

Anyways this a general question and please do a simple search before your try.

All the best.

BR,

RAM.

Former Member
0 Kudos

Try this code to close the popup

DATA lo_window TYPE REF TO if_wd_window. 

lo_window = wd_this->wd_get_api( )->get_embedding_window( ).

lo_window->close( ).