cancel
Showing results for 
Search instead for 
Did you mean: 

How to Close popup window & skip to initial view

Former Member
0 Kudos

Hi,

My issue is to close the popup window and give the message should be populated in the initial view..

1.In the first step i am selecting the change button in initial view then it should navigate to main view.

2.In the main View we select the submit button it will open a popup window in the main view.

3.In the popup window we enter Ok button means.it will close the popup and display a message in the initial view.But popup is closing in Main view

only.How to skip the main view and give the message in initial view....

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Prabhu,

I assume that the submit button of main view has the code to raise the pop up. Use the following code to raise the pop up so that custom actions can be triggered on button click.

  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'
                     message_display_mode       = if_wd_window=>co_msg_display_mode_selected
                     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
                     ).
    lr_view_controller = wd_this->wd_get_api( ).
  call method lo_window->subscribe_to_button_event
    exporting
      button            = if_wd_window=>co_button_ok
      button_text       = 'OK'
      action_name       = 'OK'
      action_view       = lr_view_controller.

call method lo_window->subscribe_to_button_event

    exporting

      button            = if_wd_window=>co_button_cancel

      button_text       = 'CANCEL'

      action_name       = 'CANCEL'

      action_view       = lr_view_controller.

  lo_window->open( ).

Now add two actions in the main view. OK and CANCEL.

In the method ONACTIONOK navigate to initial view using plug.

In the inbound plug of initial view raise the message.

I think this approach will solve your requirement.

Regards,

Sayan

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Create message area in the initial screen and from submit button, while handling the message mention the view name.

Former Member
0 Kudos

Hi prabhu,

Create plugs for initial screen...

when everyou click 'Yes' In action method just call this plug......I think it will work.

Regards,

Venkat