cancel
Showing results for 
Search instead for 
Did you mean: 

how to popup a message when close a webdynpro application URL

Former Member
0 Kudos

Hi experts

I have developped a webdynpro program,i want to popup a message (click 'yes' button,close the URL,click the 'NO' or 'Cancle' button,back to URL .)when the user close the webdynpro application URL.

Anyone can give me some ideas or sample code.

Many thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member211591
Contributor
0 Kudos

Hi Pu,

IMHO you can't avoid to close the window by clicking the "close window" or "close tab" buttons of your browser. Maybe sombody else knows if this is possible.

But you can handle your method which you use to close your application from webdynpro.

Ceate a method which is an actionhandler of your button "Close Window/Logout".

Within this method you could call Popup_to_confirm and handle its events accordingly.

event = 'on_yes' -> fire_exit_plug

event = 'on_cancel' or 'on_no' -> do nothing.

BR

ismail

Former Member
0 Kudos

Dear ismail

Thanks for your information.I found that the standard webdynpro program( for example: the order create)have this function.i want to know why can not popup the message in my program .

Many thanks!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Pu hui,

Re-implement the interface "IF_FPM_WORK_PROTECTION" and in

1)IF_FPM_WORK_PROTECTION~SUPPORTS_WORK_PROTECTION method,set

  rv_value  = abap_true.

2)IF_FPM_WORK_PROTECTION~IS_DIRTY method,set

   ev_dirty = abap_true.

If you have CLOSE button in your application,On click of Close button,It will will take of you close functionality automatically.

Here on click of OK button in popup,It will close the application,& On click of CANCEL button,It will remain in the same page.

Hope this will resolve your issue.Please close the thread ,if your issue is resolved.

Thanks

Katrice