on 08-06-2012 8:31 AM
Hi Gurus,
I'm curious on how to trigger the standard pop-up message upon closing the window if I have unsaved changes on field level. Is there anyway to do it via configuration on FPM? As I have added new tabs but it seems that it does not detect changes on field in my custom tab in the portal and I can close it immediately even if I have unsaved changes.
I know this is being done in javascript but I'm not able to find the trigger point for it, as I needed it for my custom tab in PPM 5.0. I'm building my tab on FPM_OIF_COMPONENT.
Regards,
Jordi
Hi Jordi,
You can achieve this functionality by implementing component interface IF_FPM_WORK_PROTECTION in your component.It have a method IS_DIRTY ,in this you can check the old values and changed values,if both are not equal we need to pass
ev_dirty = abap_true.by using this method
CALL METHOD cl_wd_popup_factory=>popup_to_confirm
We can raise the pop like Unsaved data is there Do you want to contuine or not.
Thanks,
Lavanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jordi, there is typically two ways to do this as described in the FPM developers guide available here on SCN.
1) Work protection interface. This uses the work protection framework provided by the portal and nwbc. ie it won't work if your fpm app runs standalone. Its described above by Lavanya and is very simple to use...
2) "NEEDS_CONFIRMATION". This method is provided when building a UIBB in WD of by adding the interface IF_FPM_GUIBB_LIST_EXT (or form, search, etc) to a GUIBB feeder class. It will work even if your app is not running in the portal or nwbc. This method has a bit more flexibility to it in that you can change the text shown to the user. Once again just search the FPM developers guide for sample of how to use it - very simple.
Sometimes I actually use both. Work protection only kicks in when you "leave" your app. Sometimes I won't the confirmation to appear when leaving a page but still with the app running - so in this case I use needs_confirmation.
i.e.
" Only activate the data loss popup when the user is navigating back to the
" initial screen as this is not handled by the portals work protection
" interface (as its not actually navigating away from the application).
if io_event->mv_event_id = 'FPM_NAVIGATE' and mv_is_dirty = abap_true.
eo_confirmation_request = cl_fpm_confirmation_request=>go_data_loss.
endif.
Subclass cl_fpm_confirmation_request to change the text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.