cancel
Showing results for 
Search instead for 
Did you mean: 

RE: help regardng the popups

Former Member
0 Kudos

Hi experts ,

i am new to webdynpro and got the task to do such tht when we click on some button it should give me the popup window and again a popup should be displayed so plz tell me the procedure for creating the popup screen in webdynpro for abap....

Plz help it is urgent!

Thanks and regards.

Sana.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Misbah,

If u want to show your view as a popup than create a view ( ex. v_popup) and one window for that view ( ex. w_popup)

Than ONactionButton DO THIS

DATA lo_action_view TYPE REF TO if_wd_view_controller.

DATA lo_popup TYPE REF TO if_wd_window.

DATA lo_api_controller TYPE REF TO if_wd_component.

DATA l_window_manager

TYPE REF TO if_wd_window_manager.

lo_action_view = wd_this->wd_get_api( ).

lo_api_controller = wd_comp_controller->wd_get_api( ).

l_window_manager = lo_api_controller->get_window_manager( ).

lo_popup = l_window_manager->create_window(

window_name = 'W_POPUP'

title = 'Display'

button_kind = if_wd_window=>co_buttons_okcancel ).

  • add here Commented part for detail see below last

lo_popup->open( ).

(_note_ for create window

<Name of the window > is the name of the WD window which shall be displayed.

<Button kind> this parameter defines which buttons will be displayed in

lower right corner of the popup window; Please use the

constants from interface IF_WD_WINDOW. Sample :

IF_WD_WINDOW=>CO_BUTTONS_OK. )

IF you want to perform some action on clicking on ok and cancel write this code where (* add here Commented part for detail see below last) this text is written

lo_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

action_name = 'DIS'

action_view = lo_action_view

is_default_button = abap_true ).

lo_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

action_name = 'CANCEL'

action_view = lo_action_view

is_default_button = abap_false ).

I hope it will work

Regards,

Varun

Edited by: Varun Kumar Jain on Jan 17, 2008 10:47 AM

Former Member
0 Kudos

Hi Sana,

For Details.. Check this thread

https://forums.sdn.sap.com/click.jspa?searchID=8059747&messageID=4301805

Regards

Sarath

Former Member
0 Kudos

hi misbah......

you just click code wizard and use the method generate popup... it creates a popup for you. in case if you need a popup of your design....

just create an extra window with a view and follow the same procedure. for further options use of the interface if_wd_window_manager.

---regards,

alex b justin

Former Member
0 Kudos

Hi Sana,

See this

You can use this code at your button event

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

INSERT `text1' INTO TABLE l_text. "#EC *

INSERT `text 2' INTO TABLE l_text."#EC *

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 = 'Confirmation'

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_yes

action_name = 'YES'

action_view = l_api

is_default_button = abap_true ).

*

l_popup->subscribe_to_button_event(

*

l_popup->open( ).

Regards

Sarath