cancel
Showing results for 
Search instead for 
Did you mean: 

popup inside a popup

Former Member
0 Kudos

Hi

I have a scenario where on click of a button a popup screen opens up with some buttons and input fields.

on click of a button (inside the popup) I want to open a new popup containing some input fields.

how we can do it ??

Thanks Vishal kapoor

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

you have to create total 3 windows.in each window embed the view.

say for ex- in window 1 you have view 1 in which there is a button ,on click of this first button our first popup shoul come so for that in the property of the button put an onactionevent.

in the onactionevet method give the following code

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.

DATA lr_view_controller TYPE REF TO if_wd_view_controller.

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 = 'Z_POP_UP' // name of the popup

  • 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_okcancel

message_type = if_wd_window=>co_msg_type_none

default_button = if_wd_window=>co_button_ok

).

lr_view_controller = wd_this->wd_get_api( ).

lo_window->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

button_text = 'ok' //button to be displayed

action_name = 'ACTFREEZE' //an onaction for second popup

action_view = lr_view_controller ).

lo_window->open( ).

from this first popup will open up.

similary in an onaction method write the same code for third popup..

hope this will help you

Former Member
0 Kudos

hi,

Step 1 - Within your created web dynpro application create a new view

Create a new web dynpro view which contains the text and UI elements you want to display

Step 2 - Create a new WINDOW (WND_POPUP) to embed the view into

Create a new window and embed the view you have just created into it.

Step 3 - Add ABAP code

Insert the following ABAP code into the appropriate place. i.e. in the wdp action method of your desired button

Data: context_node type ref to if_wd_context_node.

data: lr_popup type ref to if_wd_window,

lr_view_controller type ref to if_wd_view_controller.

data: lr_api_comp_controller type ref to if_wd_component,

lr_window_manager type ref to if_wd_window_manager.

lr_api_comp_controller = wd_comp_controller->wd_get_api( ).

lr_window_manager = lr_api_comp_controller->get_window_manager( ).

lr_popup = lr_window_manager->create_window(

MODAL = ABAP_TRUE

window_name = 'WND_POPUP' "Name of the window created in step 2

TITLE = 'Please enter all information'

CLOSE_BUTTON = ABAP_TRUE

BUTTON_KIND = if_wd_window=>CO_BUTTONS_NONE

MESSAGE_TYPE = if_wd_window=>co_msg_type_error

CLOSE_IN_ANY_CASE = ABAP_TRUE

*MESSAGE_DISPLAY_MODE = MESSAGE_DISPLAY_MODE

).

This will display a Pop up window on the click of button.

Similarly, in the Window ( Wind_popup) trigger the same code for another window.

Basically, you have to create 3 windows with 3 views.

On the Click of button in Window 1 , open window 2 like above and similarly in window 2 call window3.

Thanx.