on 09-06-2010 10:55 AM
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
Please refer the satndard component WDR_TEST_POPUP_TO_CONFIRM
Edited by: madhu reddy on Sep 6, 2010 3:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please go through this link.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/30f584c3-4fbb-2c10-cdb7-a81779e5cce0
Thanks
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.