cancel
Showing results for 
Search instead for 
Did you mean: 

POP up in webdynpro

mahesh_jagnani
Participant
0 Kudos


Hello Expert,

i have a requirement where i want to call pop up once user click on SAVE button created by us and depending on action we proceed further.The problem is we are calling a method in custom class(Not assistance class) once user click on SAVE button.

So in that class method if we call POP_UP_TO_CONFIRM,it is giving dump.

please suggest.

Thanks

Mahesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,


So in that class method if we call POP_UP_TO_CONFIRM,it is giving dump.

It is not POP_UP_TO_CONFIRM,But it is CREATE_POPUP_TO_CONFIRM.  CREATE_POPUP_TO_CONFIRM method creates an object of the type IF_WD_WINDOW; the dialog box can be created using its parameters.

PFB the sample 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.

  l_cmp_api  = wd_comp_controller->wd_get_api( ).

  l_window_manager = l_cmp_api->get_window_manager( ).

  insert `Data where changed` into table l_text.  "#EC *

  insert `Do you want to save?`  into table l_text. "#EC *

  l_popup = l_window_manager->create_popup_to_confirm(

text = l_text

button_kind  = if_wd_window=>co_buttons_yesnocancel

message_type  = if_wd_window=>co_msg_type_question

window_title  = 'Test: Popup to confirm'

window_position = if_wd_window=>co_center )."#EC *

  l_api = wd_this->wd_get_api( ).

  l_popup->subscribe_to_button_event(

  button = if_wd_window=>co_button_yes

action_name  = 'YES'

action_view  = l_api

is_default_button = abap_true ).

  l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_no

action_name  = 'NO'

action_view  = l_api

is_default_button = abap_false ).

  l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

action_name  = 'CANCEL'

action_view  = l_api

is_default_button = abap_false ).

  l_popup->open( ).

  1. endmethod.

Hope this helps you. Else, provide the snapshot of dump analysis(ST22).

Thanks

KH

denniss_
Explorer
0 Kudos

Hi Mahesh,

I always show the popup before I leave webdynpro into custom class.

- ONSAVEACTION (display popup)

- ON ACTION OF POPUP (call method of custom class -> see example from Katrice, action_name = 'YES')

Regards,

Dennis