cancel
Showing results for 
Search instead for 
Did you mean: 

Working with pop up.

Former Member
0 Kudos

Hi Experts,

I need to create a pop up window if user has not selected certain things. And telling that , through a message on this window.Means I need a pop up window, flashing a message " Please enter the details" and

destroying it on pressing ok.It should appear at the center of screen.And it should not have option of minimising and maximising window( pop up window should have a ok button and a cross to close it)..........

This is new to me, please guide me step by step.

Accepted Solutions (0)

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Vishvadeep,

Just go through [this example|http://www.sapdev.co.uk/sap-webapps/sap-webdynpro/wdp_displaypopup.htm] and you will find the entire coding to display a popup window with the desired buttons. You can also go through this complex example [2nd example|http://saptechnical.com/Tutorials/WebDynproABAP/Modalbox/page1.htm] in which the user enters a customer number in the main view & presses on a pushbutton. A popup is then displayed showing the list of all sales orders related to the customer in a table UI element. The user can then select a table row in the popup & click on a button to navigate back to the main view & display it in there.

Regards,

Uday

The below coding should work for you:

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 the details'

CLOSE_BUTTON = ABAP_TRUE

BUTTON_KIND = if_wd_window=>CO_BUTTONS_OK

MESSAGE_TYPE = if_wd_window=>CO_MSG_TYPE_INFORMATION

CLOSE_IN_ANY_CASE = ABAP_TRUE

).

You then have to add the code for the OK button of the popup.

lr_view_controller = wd_this->wd_get_api( ).

lr_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

button_text = 'OK'

action_name = 'SUBMIT'

action_view = lr_view_controller ).

Former Member
0 Kudos

Hi,

Check this standard WDA component

WDR_POPUP_TO_CONFIRM

Regards

Lekha