cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Dynamic POP ups

Former Member
0 Kudos

IS there any method that supports to embed the View in the Window at runtime, so that i can use only a single window for the POP ups

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vikranth,

U can use single window for the popup's .

Write this code in the action handler of button for which u want to display popup.

data: l_cmp_api type ref to if_wd_component,

l_window_manager type ref to if_wd_window_manager,

l_popup type ref to if_wd_window.

l_text type string_table,

l_api type ref to if_wd_view_controller.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

insert `Data where changed` into table l_text.

insert `Do you want to save?` into table l_text.

l_popup = l_window_manager->create_popup_to_confirm(

text = l_text

button_kind = 5

message_type = message_type = if_wd_window=>co_msg_type_question

window_title = 'Test: Popup to confirm'

window_position = if_wd_window=>co_center ).

l_api = wd_this->wd_get_api( ).

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_yes

action_name = 'YES'

action_view = l_api

is_default_button = abap_true ).

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_no

action_name = 'NO'

action_view = l_api

is_default_button = abap_true ).

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

action_name = 'CANCEL'

action_view = l_api

is_default_button = abap_true ).

l_popup->open( ).

In this subscribe_to_button_event method is used for handling the actions of popup buttons.

and for this method write the action names YES,NO CANCEL in the actions tab of your view.

Reward points if useful..............

Former Member
0 Kudos

Hello,

See these: [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2888] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2915] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2953] [original link is broken] [original link is broken] [original link is broken];

Regards.