Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Popup Window issue

Hi all,

I need to show a popup when feature dated records exists. For that on the Save action of the user I am checking the feature dated records and showing a popup.

ISSUE:

I am calling this popup in onSAVE action. Based on the user ok or cancel I need to perform some code in the same action. But the issue is the code below the popup is being run even before the popup is displayed and after user clicks OK or Cancel the cursor does not comeback to onSave action at all.

How to do in this scenario?

Code:

lo_window = lo_window_manager->create_window(

window_name = 'ZSDRPOPUP'

title = 'Feature Dated Records Exists.'

  • close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_selected

  • close_button = abap_true

button_kind = if_wd_window=>CO_BUTTONS_OKCANCEL

message_type = if_wd_window=>co_msg_type_none

default_button = if_wd_window=>co_button_ok

).

lo_window->subscribe_to_button_event(

button = if_wd_window=>CO_BUTTON_OK

button_text = 'Overwrite'

action_name = 'SUBMIT'

action_view = lo_view_controller ).

lo_window->subscribe_to_button_event(

button = if_wd_window=>CO_BUTTON_CANCEL

button_text = 'Cancel'

action_name = 'CANCEL'

action_view = lo_view_controller ).

lo_window->open( ).

Former Member
Not what you were looking for? View more on this topic or Ask a question