on 07-14-2009 11:43 AM
Hi Experts,
I have a webdynpro program. When i click on a button, mess should come in a pop up window. How should it be done? Thanks in advance
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved
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.
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
/enter your message here/
insert `Data where changed` into table l_text.
insert `Do you want to save?` into table l_text.
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center ).
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
Hope this will help.
Regards
Shruti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aslam,
I think the abbove answers satisfy your requirment
also try this
1. create a new addtional windoe window (eg Window Name : WINDOW2)
2. also create a new view plase some UI Elements on it (eg : VUEW 2 with some buttons and lables)
3. now embbed the view2 into window2
4.then go to the event of the button
5. now press on the wizard button then select the radio button Genarate POPUP , and select your compnent in usage press enter
6. yopu will get the following code ,
now give your window name in capital letters
and activate the application you will get the popup with thw view2
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = WINDOWNAME
title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
lo_window->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Place the following code in the OnAction method of button
DATA: l_cmp_api TYPE REF TO if_wd_component,
l_window_manager TYPE REF TO if_wd_window_manager,
l_popup TYPE REF TO if_wd_window,
l_text TYPE string_table,
l_api TYPE REF TO if_wd_view_controller,
message TYPE string.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
message = 'Invalid Material'. " your message
APPEND message TO l_text.
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>CO_MSG_TYPE_ERROR " for error message, you can change this depending on type of your msg ( for eg: information, etc )
window_title = 'Error'
window_position = if_wd_window=>co_center ).
l_popup->open( ).
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 get pop up
method onactionpopup4_1 .
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Mail successfully sent to portal administrator.` into table l_text.
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_information
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center )."#EC *
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'OK'
action_view = l_api
is_default_button = abap_true ).
l_popup->open( ).
endmethod.
Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.