cancel
Showing results for 
Search instead for 
Did you mean: 

POPUP_TO_CONFIRM_STEP

Former Member
0 Kudos

Hi all,

I can't use this FM in a webdynpro and i need to do something like that.

I tried using a popup as described in this link

[Pop-up window|http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproapplicationtodisplayaPop-upwindowonthebrowser]

the problem is that when I execute the sentence ' lo_window->open( ).' my method does not expect there to close the window. the method continues and ending while the window is open and I need to wait to see if they pressed the button 'Yes' or 'Not' for continue...

how can i do this?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Actually I am not clear on what you are trying to achieve.

Are you trying to say that , you should open a confirmation pop-up and only on the press of button "ok" , the remainder of your method should get executed??

If yes , then whay you can do is , raise the pop-up as suggested above (by subscribing required buttons) in your method and end the method .

In the event handler of "OK" button , put your remaining logic .

If this is not what you are trying to achive , please clarify a bit more.

Thanks,

Aditya.

Answers (2)

Answers (2)

Former Member
0 Kudos

had already thought about doing so. But I thought it could be done more easily. I'm not used to working with web dynpros .

I'll do as you say.

FLSaito
Participant
0 Kudos

Hi, try the following code:

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_api TYPE REF TO if_wd_view_controller.

l_popup = l_window_manager->create_popup_to_confirm(

text = 'TEXT'

button_kind = if_wd_window=>co_buttons_yesnocancel

message_type = if_wd_window=>co_msg_type_question

window_title = 'Confirm'

window_position = if_wd_window=>co_center ). "#EC *

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_false ).

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

action_name = 'CANCEL'

action_view = l_api

is_default_button = abap_false ).

l_popup->open( ).

Fabio L. Saito