cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Table Unlocking and Locking in Webdynpro ABAP and in NWBC.

Former Member
0 Kudos

Hi ,

I have a requirement in which I need to lock the table through Webdynpro Application so that no two user cannot access the table simultaneously. so for this I have used  ENQUEUE_E_TABLE for LOCK  and DEQUEUE_E_TABLE to UNLOCK table.

Suppose User1 logged into the application first, so User2 can only see my application in non editable mode which is working perfectly fine. And this editable and non editable is taking place depending on whether table is locked or Unlocked.

Problem: I have written the unlock code in the WDDOEXIT of COMPONENTCONTROLLER and also in OnAction event of one button(Like Cancel). If I test this application in both in Browser and in NWBC by pressing F5(refresh) the WDDOEXIT will not be triggered in NWBC but in Browse the method is triggered but in both the case(browser and NWBC)the DEQUEUE_E_TABLE wont be triggered to Unlock.

Illustration: User1 logged in so the table will locked for the other user. and Suppose the same user User1 presses cancel button the Unlock will take place, but if he(User1) press F5 in NWBC unlock won't take place. In SM12 table lock will be there.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Make your Lifetime option in view as "when Visible" , then it will call init and exit method every time when view will visible (in case of browser and NWBC) .

Click on view-->Properties-->Lifetime = when visible

Regards,

Deepak Singh

Former Member
0 Kudos

Hi Deepak,

Init and Exit method will be called on action of some event like by using some Buttons and so...,

I put the Break-point on method WDDOEXIT in the view level, but the method will be called only in the Browser not in NWBC when I press F5(refresh), but same method will be called in NWBC by action of event like some kind Buttons and so.

Is there any way to track the User Action (like F5) in NWBC ?

Sharathmg
Active Contributor
0 Kudos

So, your issue is that the table is unlocked when the user clicks cancel but on refresh the table lock is retained?

Regards,

Sharath

Former Member
0 Kudos

Yes Sharath, you are right...

Sharathmg
Active Contributor
0 Kudos

Sunil,

On logoff, the portal closes all the sessions and releases the locks.

Refresh, is not an action tracked by the portal. So, you may have to manually logoff by tracking the refresh event.

Personally, I have not worked on this scenario. But, try one of these options:

1. Try to call the log off method in the wdExit method.

2. If still issue persists, explore the options shared in the following links:

     http://scn.sap.com/thread/3289371

     http://scn.sap.com/thread/37898close sessions on ITS IAC iview

      http://scn.sap.com/message/11019405    

Regards,

Sharath