cancel
Showing results for 
Search instead for 
Did you mean: 

how to create pop up in web dynpro

Former Member
0 Kudos

hi dynpro guru,

I am new in WDA , Plz tell me how to create a pop up window in web dynpro?

regards

sapy

Accepted Solutions (1)

Accepted Solutions (1)

former_member342104
Participant
0 Kudos

Hi,

try to this code.....

DATA: lt_text type string_table.

DATA: mr_popup_window TYPE REF TO if_wd_window.

    • pop a confirmation window for display purpose

DATA: l_window_manager TYPE REF TO if_wd_window_manager,

l_cmp_api TYPE REF TO if_wd_component,

l_window TYPE REF TO if_wd_window.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

append 'DO YOU WANNA SAVE DATA' to lt_text.

CALL METHOD l_window_manager->create_popup_to_confirm

EXPORTING

text = lt_text

button_kind = if_wd_window=>co_buttons_yesno

CLOSE_BUTTON = ''

WINDOW_TITLE = 'WINDOW TITLE'

WINDOW_WIDTH = '25'

WINDOW_HEIGHT = '50'

WINDOW_LEFT_POSITION = 10

WINDOW_TOP_POSITION = 10

WINDOW_POSITION = '25'

RECEIVING

result = mr_popup_window.

    • associated the action handling methods with the window

DATA: view_controller TYPE REF TO if_wd_view_controller.

view_controller = wd_this->wd_get_api( ).

CALL METHOD mr_popup_window->SET_WINDOW_SIZE

EXPORTING

WIDTH = '150'

HEIGHT = '150'.

CALL METHOD mr_popup_window->subscribe_to_button_event

EXPORTING

button = if_wd_window=>co_button_yes

action_name = 'ON_DELETE_POPUP_YES'

action_view = view_controller

is_default_button = abap_false.

CALL METHOD mr_popup_window->subscribe_to_button_event

EXPORTING

button = if_wd_window=>co_button_no

action_name = 'ON_DELETE_POPUP_NO'

action_view = view_controller

is_default_button = abap_false.

mr_popup_window->open( ).

regards

kk

Answers (0)