cancel
Showing results for 
Search instead for 
Did you mean: 

Popup display ( How to make synchronous popup)

Former Member
0 Kudos

Hi All,

I'm using below code to display popup & no issue with that it's working fine but this is asynchronous display. I want to make popup to synchronous so that i can able to use popup input values in next step to perform some other logic. Please advice me how to make popup to synchronous.

data: l_cmp_api type ref to if_wd_component,

l_window_manager type ref to if_wd_window_manager.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

if wd_this->m_popup is initial.

wd_this->m_popup = l_window_manager->create_window(

window_name = 'TAXWARE_WINDOW'

TITLE = 'Limit Selection'

close_button = abap_true

button_kind = if_wd_window=>co_buttons_okcancel ).

endif.

wd_this->m_popup->open( ).

Thanks & Regards,

Anil.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello, Anil,

In WDA there's no way to do this. What you have to do is subscribe to a popup button event, and when the user clicks on a button, it will fire your event.


data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager.

l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).

if wd_this->m_popup is initial.
wd_this->m_popup = l_window_manager->create_window(
  window_name = 'TAXWARE_WINDOW'
  title = 'Limit Selection'
  close_button = abap_true
  button_kind = if_wd_window=>co_buttons_okcancel ).

  wd_this->m_popup->subscribe_to_button_event(
    button  = if_wd_window=>co_button_ok
    action_name = 'ACTION_OK'
    action_view = l_cmp_api
    is_default_button = abap_true ).

  wd_this->m_popup->subscribe_to_button_event(
    button  = if_wd_window=>co_button_cancel
    action_name = 'ACTION_CANCEL'
    action_view = l_cmp_api
    is_default_button = abap_false ).

endif.

wd_this->m_popup->open( ).

Then you create the ACTION_CANCEL and ACTION_OK events, and do your logic.

Regards,

Andre