on 06-07-2007 7:14 AM
Hi experts,
Please go through below code, Which popus up the window but when i click on YES button it throws an error like
" Controller for View, Window, Interface, and Configuration Cannot Be Created"
lr_component = wd_comp_controller->wd_get_api( ).
lr_window_manager = lr_component->get_window_manager( ).
lr_window = lr_window_manager->create_popup_to_confirm(
text = str_table
button_kind = 4
message_type = 5
close_button = 'X'
window_title = 'Screen Exit>>'
WINDOW_LEFT_POSITION = 10
WINDOW_TOP_POSITION = 10
WINDOW_POSITION
WINDOW_WIDTH
WINDOW_HEIGHT
).
l_api = wd_this->wd_get_api( ).
lr_window->subscribe_to_button_event( button = lr_window->co_button_yes
action_name = 'YESHANDLER'
action_view = l_api ).
lr_window->open( ).
where YESHANDLER is an event defined in same View's event.
any inputs?
Thanks in advance,
Hi
There are some corrections to be made in your code. action_name should be provided...not event name....It will check only in the actions .....not in the events...
/Anzy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still problem persists
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi prasad,
This code works perfectly fine without any problem
DATA:
lo_cmp_api TYPE REF TO if_wd_component,
lo_window_manager TYPE REF TO if_wd_window_manager,
lo_popup TYPE REF TO if_wd_window,
lt_text TYPE string_table,
lv_message TYPE string,
lv_message_title TYPE string,
lo_api TYPE REF TO if_wd_view_controller.
lo_cmp_api = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_cmp_api->get_window_manager( ).
lo_popup = lo_window_manager->create_popup_to_confirm(
text = lt_text
button_kind = if_wd_window=>co_buttons_yesno
message_type = if_wd_window=>co_msg_type_question
window_title = lv_message_title
window_position = if_wd_window=>co_center ).
lo_api = wd_this->wd_get_api( ).
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'TEST_YES'
action_view = lo_api
is_default_button = abap_true ).
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
action_name = 'TEST_NO'
action_view = lo_api
is_default_button = abap_false ).
lo_popup->open( ).
Thanks
Anzy
Sorry it was my mistake in writing.
Its actually an Action defined in WDApp.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.