cancel
Showing results for 
Search instead for 
Did you mean: 

How to use popup screen?

Former Member
0 Kudos

Hi All,

I created a view with login details with username and password.If the data entered in the username or password input fields are worng i need a popup screen with a message "username or password incorrect".

can any one explan me how to call a popup?and how to pass text to the popup screen?

Thankx,

Anusha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use the following code

DATA: l_cmp_api          TYPE REF TO if_wd_component,
        l_window_manager   TYPE REF TO if_wd_window_manager,
        l_popup            TYPE REF TO if_wd_window,
        l_text             TYPE string_table,
        l_api              TYPE REF TO if_wd_view_controller,
        message            TYPE string.

  l_cmp_api        = wd_comp_controller->wd_get_api( ).
  l_window_manager = l_cmp_api->get_window_manager( ).

  message = 'username or password incorrect'.
  APPEND message TO l_text.

  l_popup = l_window_manager->create_popup_to_confirm(
                text            = l_text
                button_kind     = if_wd_window=>co_buttons_ok
                message_type    = if_wd_window=>co_msg_type_information
                window_title    = 'Information'
                window_position = if_wd_window=>co_center ).

  l_popup->open( ).

Hope it helps!

Regards,

Radhika.

Former Member
0 Kudos

Hi Radhika,

Thanks for your quick reply.

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Simply create a view, put a text view on it. Enter the required message in it. Create a new window. Embed the view in this window. Now use code wizard (ctrl+F7) to generate the pop up window.

Regards

Arjun