‎2008 Aug 06 7:45 PM
Hi,
How to handle multiple user activities in dialog programming ?
In my custom dialog transaction, there is very little probability that two or more will be working on the same data. But in case by chance, two people try to modify the same data, how should that be handled ?
Can anyone explain in detail?
thks
‎2008 Aug 06 7:49 PM
Yes, you should always, regardless of chances, use lock objects when updating database tables. These are generated in the ABAP dictionary for each table, or you could define it to cover mulitple tables at one time. It will also generate functions modules, ENQUEUE_<name of lock object> and DEQUEUE_<name of lock object>, which you use to Lock, and Unlock..
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Regards,
Rich Heilman
‎2008 Aug 06 7:49 PM
Yes, you should always, regardless of chances, use lock objects when updating database tables. These are generated in the ABAP dictionary for each table, or you could define it to cover mulitple tables at one time. It will also generate functions modules, ENQUEUE_<name of lock object> and DEQUEUE_<name of lock object>, which you use to Lock, and Unlock..
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
Regards,
Rich Heilman
‎2008 Aug 06 7:52 PM
Hi,
For any table in the Database,
you need to use the locks to protect the data
You can have Enqueue and Dequeue Function modules..
So for any users
before they modify the data..
Call function Ztab_enqueue..
Logic to modify data.
Call function Ztab_dequeue .
The above chain allows a single user to modify the database data at a time..
Thank you
‎2008 Sep 18 11:30 AM
Hi all...
U should use Logical Unit of Work(LUW)...
If luw starts set the lock mechanism ends release luw..