cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation between two Windows in Webdynpro ABAP

former_member187651
Active Participant
0 Kudos

Hello Gurus,

My requirement is to open a popup with with button click. I have implemented the same using the code below:

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

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.

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_PROTYPE'
*                  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_close
                    message_type           = if_wd_window=>co_msg_type_none
                    default_button         = if_wd_window=>co_button_close

                    ).

lo_window->open( ).

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

I have created new window say 'W_PROTYP' . In this window I have embedded one view. This view contains one dropdown, where I need to select the value and submit button.

When user click on 'Submit' button, it should navigate from POPUP window to parent Window another view(not calling view) with value selected in the parameter.

Please let me help, Its urgent.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandan,

You can do this to solve your problem.

Add this code between the methods "create_window" and "open".

data: lr_view_controller type ref to if_wd_view_controller.

* Adds an action to the popup screen buttons

  lr_view_controller = wd_this->wd_get_api( ).

  lo_window->subscribe_to_button_event(

  button = if_wd_window=>co_button_ok

  button_text = 'Go to view'

  action_name = 'NAVIGATE'

  action_view = lr_view_controller ).

Then create an action "NAVIGATE" in your main view and you'll be able to do your navigation in this method.

Hope this helps.

KR,

Christophe

former_member187651
Active Participant
0 Kudos

Hello Christophe,

thanks for your reply, it really worked to navigate to another view of parent window. Now just one query, how can I take the input value from POPUP to the parent view. I need to navigate with value selected from POPUP window.

Please reply, its urgent to me.

Former Member
0 Kudos

Hi Chandan,

Simply use the context mapping between view and controller to do this.

Kr,

Christophe

former_member187651
Active Participant
0 Kudos

Hello


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

Former Member
0 Kudos

Hi Christophe and Chandan,

I am having similar requirement.Could you please tell me how to navigate from one window to another inside the navigate action.pls reply in detail.

Thanks,

Rohini

former_member187651
Active Participant
0 Kudos

Check the reply of Christophe in the same post. Its worked for me.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Chandan,

Simply you can close the window which you have opened and use global controller to share the data between the views. To do that please follow the below things

1)Capture the window instance lo_window  in global variable( declare the attribute in component controller).

2)When you click on submit button close the window and pass the data to global controller. 

3) Then the data would be shared.

To close the window use the global variable lo_window and method close as lo_window->close( ).

Thanks and regards,

Srikanth Pullela

Former Member
0 Kudos

Hi Chandan,

I guess it is what you are looking form . Check this.

http://scn.sap.com/people/ian.stubbings/blog/2010/02/22/hcm-processes-forms-web-dynpro-abap-search-h...

Hope this helps.

regards,

Xiang Li

Message was edited by: xiangli heah Sorry I just release your are not working on Adobe Form in HCM P&F. Just to let you know that there is possibility to call ABAP WDP from Adobe Form, as search help or to do others action in the WDP and return value to form, using form scripting. All scripting needed for pop up are already-built in HCM P&F. If you want to do the same, you might to do it manually and copy a few scripting over into your form. Let me know if you want the form scripting in detail. Thanks.

uppu_narayan
Active Participant
0 Kudos

Hi chandan,

      On the click of submit close the popup and call the inbound plug of the parent view and while calling the inbound plug pass the neccessary data.......

  wd_this->fire_ob_view1_plg(
     p_city    =    ' '         
     p_name =    ' '                      
     p_state  =    ' '                    
   ).


thanks and regards,

narayan

former_member210266
Active Participant
0 Kudos

Hi Chandan

You can create an event handler in the calling view for the Summit button. In the event handler, you can then fire an outbound plug linked to the inbound plug of the view you want to display. Send the value selected through event parameter or by context mapping.

Regards

Swati

former_member187651
Active Participant
0 Kudos

This message was moderated.

former_member187651
Active Participant
0 Kudos

Hello Swati,

Thanks for your reply. but I don't have both the view in the single window, this is the main problem. Popup is opening in the 2nd window created to open the popup. Linking with the Outbound to Inbound Plugs is not possible in that case.

Currently I do not have any problem with passing the value as we can get it by assigning to global variable. but problem is how to navigate from POPUP window to calling  window  another view (not calling window.).

I think now we are able to understand the problem I am facing.

thanks again.

0 Kudos

Hi Chandan,

declare the second window as a used component of your view, then you can access the window

regards,

Aneesh.S

former_member210266
Active Participant
0 Kudos

Hi Chandan

I think you misunderstood my reply.

I was asking you to first go to the calling view and from there you can navigate to the another view.

create an event handler in the calling view by subscribing to the button event( as mentioned by Christophe). Then in the event handler, you can call the second view easily as now you will be in the same window.

I hope I am clearer this time.

Please refer to the link for example

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f4114d-00a3-2e10-58ae-ea699d11c...

Regards

Swati