cancel
Showing results for 
Search instead for 
Did you mean: 

Events before main window is closed. Dialog 'Save your data' before closing

former_member386290
Participant
0 Kudos

Hello all,

I have a standalone Webdynpro component/ application (which is not embedded in portal or anything) that I use to enter data into database tables.

When a user tries to close the window (or exit the window by any means), I want to give him/her a pop-up that 'Data might have changed. Do you want to save before exiting?'

How can I do that?

I tried 'WDDOONCLOSE' method of the window but it is not triggered. Only method I see triggering is the view method 'WDDOEXIT' , but it is triggered after the window is closed, so you cannot issue a pop up.

Thanks in advance.

ABAPer

Accepted Solutions (0)

Answers (2)

Answers (2)

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you are talking about the MAIN WINDOW(Internet explorer) , I am not sure whether SAP has such provision to handle this requirement.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

wd before action or wd after action ...this gets triggered every single action you make.....

to know whether any changes are made ,,,,

first one at attribute level and second one at node level.

you will have a method IS_CLIENT_CHANGED in the class, just like we have READ and SET. IS_CLIENT_CHAGED is one more method availble for checking whether the attribute has changed our not

you will similar method availble in the NODE class, just like we have BIND_TABLE, this is used to check whether the complete node has been changed our not.

IF_WD_CONTEXT_NODE=>IS_CHANGED_BY_CLIENT

IF_WD_CONTEXT_ELEMENT=>IS_CHANGED_BY_CLIENT

former_member386290
Participant
0 Kudos

Thank you mate for your reply.

But WDDOAFTERACTION and WDDOBEFOREACTION methods are not triggered when you close windows.

Regards,

ABAPer

saravanan_narayanan
Active Contributor
0 Kudos

Hello,

Data loss popup is not possible for standalone webdynpro application. check this thread.

BR, Saravanan