Skip to Content

Creating a popup window for entering text

hi there,

i know there are methods like IF_WD_WINDOW_MANAGER~CREATE_AND_OPEN_POPUP and others to open a popup and display buttons there etc.....

my requirement is to open a popup where the user can enter text, which can be endless long. After entering the text he should confirm it with OK button.

is there any standard in web dynpro abap to open such an "note editor" ?

br Martin

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 05, 2016 at 06:48 AM

    Hi Martin,

    There is a standard method create_window from interface IF_WD_WINDOW_MANAGER which may help you to solve your problem.please follow below steps

    1. create a pop up view(V_POPUP) and place the UI element TEXTEDIT( work as a long editor)

    2. bind the UI element with string for long text

    3. create a new window(W_POPUP) ,embedded the view(V_POPUP) to W_POPUP

    4. Call the pop up window by using the method create window (insert below given code in side your action/method where you need to call the pop up view)

    6. create a action called " OK_SAVE"(in action Tab of view) to handle your OK button functionality and write you save text logic inside the OK_SAVE action

    7. if you need endless text better go with standard text which will help to store long texts in sap

    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'

    title = 'Enter text'

    close_in_any_case = abap_false

    message_display_mode = if_wd_window=>co_msg_display_mode_selected

    * close_button = abap_true

    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( ).

    "OK action functionality

    DATA lo_api_v_main TYPE REF TO if_wd_view_controller.

    lo_api_v_main = wd_this->wd_get_api( ).

    CALL METHOD lo_window->subscribe_to_button_event



    * button_text = 'OK'

    * tooltip =

    action_name = 'OK_SAVE' "pass your action name here

    action_view = lo_api_v_main

    * is_default_button = ABAP_FALSE




    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Martin Svik

      Hi Martin,

      You can use the Below method of IF_WD_WINDOW

      lo_window->set_window_size( width = '20%' height = '20%' ).

      LO_WINDOW->OPEN( ).