on 05-22-2006 5:27 PM
I have some table data that I want to update and I want to LOCK it. The standard enqueue/ dequeue method doesn't work across different user sessions in a BSP environment.
Has anyone else solved this issue? Is there a 'standard approach'? or is it a case of build your own locking table?
regards and thanks in advance,
Nigel
Hi,
you mean, no one else may update it at the same time ?? or are you the only one to update it ?? This is a difficult case and you must think how you create it.
Is there any representation of the table in BSP ?? If so, then create a subroutine where you save in a variable the user name of the first one to call it and erase that variable when leaving the page. If some one else calls that page, he won´t be able to work with it in case there´s a value in your variable.
For the second option you can work with authorizations for calling transaction SE16:
AUTHORITY-CHECK OBJECT object
ID name1 FIELD f1
ID name2 FIELD f2
...
ID name10 FIELD f10.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
this can be acheived as follows:
if you are using MVC then you must be updating table in a model class.
declare a static variable say "TOKEN type int1" initially put its value as "TOKEN = 0".
now every time to access this table follow this protocol:
if you want to update it check the value of token. if its 0 get the token i.e TOKEN = 1 and update the table after updating change value of TOKEN = 0 ,else wait or so.
and if you are using simple flow layout you can acheive this by declaring a static variable in your Apllication class. simmilarly in this also check for the value of the variable prior to accessing the table.
cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.