cancel
Showing results for 
Search instead for 
Did you mean: 

Event on close Browser to unlock Data

Former Member
0 Kudos

Hi experts,

I have an OVP Floorplan and the problem is, that by closing the Browser, all Data Locks remain in SM12.

Is there an Event or Method called before closing the browser or how can I Unlock the Data?

I've red, that the Method WDDOINIT of the Application Component Controller is called, but how can I access this Method.

I have Feeder-Klasses for the UIBBs and an Assistance Class for the Application Component Contoller, but there is no Method WDDOINIT in this Assistance Class!

Thanks and regards,

Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Katrice,

thanks for you reply.

We have already a custom close button but the application is embeded in Browser so many user close the application by pressing the close browser button because for them this is intuitiv. If there is no handling for this situation, we collect Data Locks in SM12.

Any ideas to solve the problem?

Thanks,

Sebastian

Former Member
0 Kudos

Hi Sebastian,

We do not have control on click of Close button(browser). You need to give training to the end user to click of your custom close button but not  browser based close button.

Thanks

KH

Former Member
0 Kudos

Hi Katrice,

thanks for your quick response.

That is absolutely annoying. SAP creates a browser based application and it is forbidden to push the browser buttons. But ok, not your fault.

According to my experience, even with training, many user will regularly press the close brower button and there is nothing we can do to prevent this situation of open locks .

Former Member
0 Kudos

Hi Sebastian,

We need to wait and see if SAP comes out with any solutions for controlling/handling browser based buttons .

Thanks

KH

Answers (2)

Answers (2)

Attila
Active Participant
0 Kudos

Hello Sebastian,

I solved the browser close problem enhancing the class CL_FPM, to release locks/resources (since the exit event is not propagated from WD to FPM). To do this our own methods have to be called somehow before framework is releasing resources in method DELETE of class CL_FPM.

The steps required to reach this:

  • Create an enhancement of class CL_FPM
  • Add a new member table attribute f.e. mt_zzcallbacks table to class CL_FPM
  • Add a new public instance method f.e. zzregister_callback to class CL_FPM, to put any class instance and method to the table above, from your own classes.(Methods added should not contain any obligatory parameter and has to be of type instance public also)
  • Create a pre-exit of method delete of class CL_FPM and loop over the callback table calling the methods dynamically (catch the following exceptions: ABAP Keyword Documentation).
  • Put your code to release the locks/resources into the registered callback methods (it will be called exiting the application )

This works when user closes the browser/tab improperly.

Of course you can provide a possibility to close the application using a button, where you can do additional checks etc, data loss notification etc.

So if you use a Close button with event FPM_CLOSE (doing checks etc. ) and releasing your locks also handling the event  FPM_CLOSE, then you can create a new method in class CL_FPM to deregister the method from the callback table, since you did free already and not necessary to do it again using the callback.

Kind regards

Attila

Former Member
0 Kudos

Hi Sebastian,

WDDOINIT( ) method will be present in webdynpro component but not assistance class.And on click of CLOSE browser button we dont have event/control that trigger's because it is browser button.

The other work around will be "Give one custom CLOSE button on your screen and you can have control/event raised on click of that custon CLOSE button".

And in corresponding event of custom CLOSE button, you can unlock the data using this below FM.

DEQUEUE_E_TABLEE(Release lock on object E_TABLEE).

Hope this might give you an idea,else revert back.

Thanks

KH