on 05-29-2013 3:20 PM
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
).
L_RUNTIMEAPI = WD_THIS->WD_GET_API( ) .
*Subscribe to event OK
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
BUTTON_TEXT = 'I agree'
action_name = 'CONFIRM_OK'
action_view = L_RUNTIMEAPI
).
*Subscribe to event Cancel
lo_window->subscribe_to_button_event(
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( ).
ENDIF.
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
Matteo
you can try to do it in another method (maybe modify_view and check on first_time). I don't know if this will help though. I think it's a very strange requirement and also tricky to enhance the standard powl component like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.