cancel
Showing results for 
Search instead for 
Did you mean: 

Display confirmation dialog window

Former Member
0 Kudos

Hi Experts,

I have a abap webdynpro application and my requirement is like, to display confirmation dialog box with Yes and No buttons over my input screen. If I click on Yes, data has get saved into database...If No, it shold not save into database...

Please can you provide clear steps to create confirmation dialog window.

Could anyone help me..

Regards,

Prasanthi

Accepted Solutions (0)

Answers (4)

Answers (4)

Madhu2004
Active Contributor
0 Kudos

Please refer the satndard component WDR_TEST_POPUP_TO_CONFIRM

Edited by: madhu reddy on Sep 6, 2010 3:45 PM

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Use the below code to display a confirmation dialog box with YES and NO buttons.

data: window_manager type ref to if_wd_window_manager,

cmp_api type ref to if_wd_component,

window type ref to if_wd_window,

lt_texts type string_table,

l_api type ref to if_wd_view_controller.

append 'Do you really want to approve the CV ? ' to lt_texts.

cmp_api = wd_comp_controller->wd_get_api( ).

window_manager = cmp_api->get_window_manager( ).

window = window_manager->create_popup_to_confirm(

text = lt_texts

button_kind = if_wd_window=>co_buttons_yesno "if u want cancel button u can use yesnocancel

message_type = if_wd_window=>co_msg_type_none ).

l_api = wd_this->wd_get_api( ).

The below code explains you that on click of YES button the action YESAPPROVE is excuted.

for NO button also you can write the same code

button in the place of if_wd_window=>co_button_yes you can put as if_wd_window=>co_button_no

and provide the action name.

window->subscribe_to_button_event(

button = if_wd_window=>co_button_yes

action_name = 'YESAPPROVE'

action_view = l_api

is_default_button = abap_true ).

window->open( ).

Go To ACtions Tab in the view and create an action YESAPPROVE and mention the action name on the required button you want.

Regards,

Priya

Former Member
0 Kudos
Former Member
0 Kudos

Hello Prashanthi,

Please refer to the following tutorial on SDN: http://wiki.sdn.sap.com/wiki/display/WDABAP/DialogboxesinWebDynproABAP

In step 12, you will find the code snippet for creating a confirmation dialog window and the corresponding event handlers.

Hope this helps!

Regards,

Srilatha M