cancel
Showing results for 
Search instead for 
Did you mean: 

pop up message

Former Member
0 Kudos

Hi all,

AS per my requirement i need a pop-up window with 2 buttons on it....

one for upgrade and another for Non upgrade....

when i click on upgrade button it should fetch the corresponding vales similarly for non-upgrade..

suggest me.... how to approach for this

Regards

Suprith

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

check this url

see the model dialog box sample in saptechnical wesite.

i think it will help for this

Regards,

Kumar K

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Suprith,

You just need to create a popup & then subscribe to its button events using the method subscribe_to_button_event( ). Just go through this [link |sapdev.co.uk/sap-webapps/sap-webdynpro/wdp_displaypopup.htm] to see a complete code of generating a popup & subscribing to its buttons.

Regards,

Uday

Former Member
0 Kudos

Hi,

You will have to create a separate view and window to achieve this requirement.

Steps:

1. Create a view, and design the layout as per your requirements

In your case, you can place to buttons.

2. Create a new window and embed the newly created view.

Now use this code to call the window as a popup

* Popup
  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          = 'W_POPUP' " window name
    message_display_mode = if_wd_window=>co_msg_display_mode_selected
    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( ).

If you want to read the data of your main view in the Popup, you will have to keep your node in the component controller.

Regards,

Radhika.