on 11-17-2011 1:25 PM
Hi ,
1. I need to handle the popup buttons in the custom popup.
I have declared the button enabling functionality in wddoinit , but while i am acessng the button no action is performed.
even though i have implemented the following actioncode for ok and cancel .
DATA: lv_ok TYPE string,
lv_cancel TYPE string,
lv_view TYPE REF TO if_wd_view_controller.
lv_view = wd_this->wd_get_api( ).
register button events
lv_ok = cl_wd_utilities=>get_otr_text_by_alias( alias = 'PAOC_RCF_UI/OK' ).
wd_comp_controller->go_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = lv_ok
action_name = 'OK'
action_view = lv_view
).
lv_cancel = cl_wd_utilities=>get_otr_text_by_alias( alias = 'PAOC_RCF_UI/CANCEL' ).
wd_comp_controller->go_window->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
button_text = lv_cancel
action_name = 'CANCEL'
action_view = lv_view
).
Edited by: Swetha Chevuru on Nov 17, 2011 2:29 PM
Your registration of the button events looks correct. Are you sure that go_window isn't getting recreated at some later time? Recreating the object instead of just calling the display method will cause the event registrations to be reset.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swetha
Use this Code in your WDDOINIT and then ONACTIONYES write the action that you want to perform.
data:
l_api type ref to if_wd_view_controller,
l_window_ctlr type ref to if_wd_window_controller,
l_popup type ref to if_wd_window.
l_api = wd_this->wd_get_api( ).
l_window_ctlr = l_api->get_embedding_window_ctlr( ).
if l_window_ctlr is bound.
l_popup = l_window_ctlr->get_window( ).
if l_popup is bound.
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
button_text = 'Yes' "#EC *
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
endif.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.