on 01-18-2008 6:33 AM
Hi Everyone,
How do i generate a pop-up in the same view??
Suppose i enter some values in the input-fields of the view now how do i generate a pop-up message saying successful once i click the button???
Thanks n regards,
urvashi
Hi Urbashi,
If you are looking for a POP-UP in your same view you can refer to the following code
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,
lv_text TYPE string_table,
lo_api TYPE REF TO if_wd_view_controller,
lv_string TYPE string_table,
l_string TYPE string,
l_title type string.
*display confirmation window
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 = lv_string
button_kind = if_wd_window=>co_buttons_yesno
window_title = l_title
close_button = abap_false
message_type = if_wd_window=>co_msg_type_warning
window_position = if_wd_window=>co_center ).
lo_api = wd_this->wd_get_api( ).
If you want Yes or no buttons then put the following code else
put button_kind = if_wd_window=>co_buttons_none in the above statement.
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'CANC'
action_view = lo_api
is_default_button = abap_false ).
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
action_name = 'NO'
action_view = lo_api
is_default_button = abap_true ).
Hope this helps.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi urbashi.........
in the on action method....
click code wizard... and make use of the method ... generate popup... and you can also have a look at the interface if_wd_window_manager.
---regards,
alex b justin
Edited by: Alex Justin on Jan 18, 2008 12:13 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
IN ORDER to generate a pop-up i used the wizard n pulld in the code on that button action...since i wantd to type item postd,for title i gave dat...
but m gettin the err...
"An Instance of the View ZTEST1234 Already Exists in the Component "
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 = 'ZTEST1234'
title = 'ITEM POSTED'
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( ).
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.