Skip to Content
May 29, 2013 at 02:20 PM

POWL custom popup


Dear experts,

I'm working on a requirement on an SRM 7 system: each time a POWL is opened by users which have a specific role (e.g., bidder) I have to show a page which contains a text (Terms and Conditions); the user should read the conditions and press on the "I agree" button in order to access the POWL.

I thought to implement this using a popup. Don't know if this is the proper way of doing it, anyway, here's my approach so far:

- I enhanced the standard WD Component POWL_UI_COMP by creating a custom window (CONDITIONS_POPUP) and a custom view (POPUP_VIEW);

- I then trigger the popup in the MASTER_MATRIX view method WDDOINIT: first of all, I check if the user is a bidder, then trigger the popup in following way:

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 = 'CONDITIONS_POPUP'

title = lv_title

close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_selected

close_button = abap_false

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



*Subscribe to event OK


button = if_wd_window=>co_button_ok

BUTTON_TEXT = 'I agree'

action_name = 'CONFIRM_OK'

action_view = L_RUNTIMEAPI


*Subscribe to event Cancel


button = if_wd_window=>co_button_cancel

BUTTON_TEXT = 'I disagree'

action_name = 'CONFIRM_CANCEL'

action_view = l_runtimeapi


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

lo_window->SET_IS_RESIZABLE( abap_false ).

lo_window->open( ).


The above approach seems to fit my desiderata, but there's a side-effect problem. In our system, POWL auto-refresh is implemented. After the user press the "Ok" button, then the POWL screen is visible but the result table is stuck at "Refresh is running", without completing the activity.

I tried both triggering the RESUME and the REFRESH_CURRENT methods of COMPONENTCONTROLLER in the method ONACTIONCONFIRM_OK (which is the event handler binded to the "Ok" button of my popup), but this seems not to work.

Could anyone give me an hint or suggestion on the task? Any help will be highly appreciated.

Thanks 😉