on 06-11-2007 10:17 AM
I encountered an error when try to register events to popup button:
-
The following error text was processed in the system SMF : The dafault button could not be set, as it has not been specified as a popup button
The error occurred on the application server uscismf_SMF_10 and in the work process 0 .
The termination type was: RABAX_STATE
-
OR
-
No Button 4 Is Defined for Popup WIN_POP_CSI
-
What step I missed for the correct setup?
Is any one who can help me?
Thanks
Hello, I changed open to the last according to your suggestion,
but it still doesn't work:
Code:
-
method OPEN_POPUP_EVENT .
data:lr_api_comp_controller type ref to if_wd_component,
lr_window_manager type ref to if_wd_window_manager,
ok_text TYPE string.
lr_api_comp_controller = wd_this->wd_get_api( ).
lr_window_manager = lr_api_comp_controller->get_window_manager( ).
e_popup = lr_window_manager->create_window(
MODAL = ABAP_TRUE
window_name = i_popup_name
title = i_title
CLOSE_BUTTON = ABAP_TRUE
button_kind = if_wd_window=>co_button_ok
message_type = if_wd_window=>co_msg_type_information
CLOSE_IN_ANY_CASE = ABAP_TRUE
MESSAGE_DISPLAY_MODE = MESSAGE_DISPLAY_MODE
).
e_popup->set_window_position( left = 500 top = 500 ).
e_popup->set_button_kind( if_wd_window=>co_button_ok ).
ok_text = 'Assign'.
if ( e_popup is bound ).
e_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = OK_TEXT
action_name = I_EVENTN
action_view = I_VIEW_CTR
is_default_button = abap_true ).
endif.
e_popup->open( ).
wd_this->w_pop = e_popup.
endmethod.
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
Can you try the following:
data:lr_api_comp_controller type ref to if_wd_component,
lr_window_manager type ref to if_wd_window_manager,
ok_text TYPE string,
e_popup type ref to if_wd_window,
lr_view_controller type ref to if_wd_view_controller.
lr_api_comp_controller = wd_comp_controller->wd_get_api( ).
lr_window_manager = lr_api_comp_controller->get_window_manager( ).
ok_text = 'Assign'.
e_popup = lr_window_manager->create_popup_to_confirm(
text = <message table>
button_kind = if_wd_window=>co_button_ok
message_type = if_wd_window=>co_msg_type_success
window_title = ok_text
window_position = if_wd_window=>co_center
).
if ( e_popup is bound ).
lr_view_controller = wd_this->wd_get_api( ).
e_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = OK_TEXT
action_name = 'OK'
action_view = lr_view_controller
is_default_button = abap_true ).
endif.
e_popup->open( ).
Try if this works. I have done like this and it has worked.
Regards,
Nithya
Solve, I made a small mistake that results in big, see code in bold
wd_comp_controller->open_popup(
EXPORTING
i_title = 'Check Step Pool Insert'
i_popup_name = 'WIN_POP_CSI'
<b> i_button_kind = if_wd_window=>co_buttons_ok</b>
i_message_type = if_wd_window=>co_msg_type_none
IMPORTING e_popup = e_popup ).
if ( e_popup is bound ).
e_popup->subscribe_to_button_event(
<b>button = if_wd_window=>co_button_ok</b>
button_text = 'OK'
action_name = 'ADDCS'
action_view = lr_view_controller
is_default_button = abap_true ).
Hi,
I think u have given the name of a button as default which is not present like
in ur window u have specified buttons ( yes and no ) and in default u have setted 'CANCEL' button , paste the code which u r using.
Regards
Yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Code which caused the exception:
data:lr_api_comp_controller type ref to if_wd_component,
lr_window_manager type ref to if_wd_window_manager,
ok_text TYPE string.
lr_api_comp_controller = wd_this->wd_get_api( ).
lr_window_manager = lr_api_comp_controller->get_window_manager( ).
e_popup = lr_window_manager->create_window(
MODAL = ABAP_TRUE
window_name = i_popup_name
title = i_title
CLOSE_BUTTON = ABAP_TRUE
button_kind = if_wd_window=>co_button_ok
message_type = i_message_type
CLOSE_IN_ANY_CASE = ABAP_TRUE
MESSAGE_DISPLAY_MODE = MESSAGE_DISPLAY_MODE
).
e_popup->set_window_position( left = 500 top = 500 ).
e_popup->open( ).
e_popup->set_button_kind( if_wd_window=>co_button_ok ).
e_popup->set_default_button( if_wd_window=>co_button_ok ).
ok_text = 'Assign'.
if ( e_popup is bound ).
e_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = OK_TEXT
action_name = I_EVENTN
action_view = I_VIEW_CTR
is_default_button = abap_true ).
endif.
wd_this->w_pop = e_popup.
Hi,
U have written the code e_popup->open( ). in the middle which has to written at the last .
First create the window which u have done ,
set the properties like defalut button , button kind , size
then if want to handle the event bye the buttons in window subscribe it ,
then open the window .
so its the last step which u have done in middle and its causing the problem
Regards
Yashpal
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.