cancel
Showing results for 
Search instead for 
Did you mean: 

Generating pop-ups in the same view

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182190
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

hi all,

how do we make use of component usage..?hw do we create it...does having a component usage mean dat we can display any no of views in a single view ui container?

regards,

Urbashi

Former Member
0 Kudos

hi urbashi....

component usage is for making use of other component inside your component.

this link would help you.....

[link|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f]

---regards,

alex b justin

Former Member
0 Kudos

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( ).

Former Member
0 Kudos

hi urbashi......

you already existing window is ztest1234. and you are passing the same window name to the popup...

change it to ztest12345 or something.

---regards,

alex b justin

Former Member
0 Kudos

hey hi

the prob is a nt able to type in any window name...it automatically takes ztest1234

reagrds,

Urvashi

Former Member
0 Kudos

HEY HI...GT THE ANS...

tHANKS