Hello Johnson,
Refer following http://scn.sap.com/thread/3247164. Or try to implement "IF_FPM_WORK_PROTECTION" interface in your WDP component and the set "Dirty_flag = abap_true".This will open a confirmation popup while closing the browser window.
Thanks
Katrice