Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

multiple users with single dialog..

Former Member
0 Likes
531

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

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
436

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

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
437

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

Read only

Former Member
0 Likes
436

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

Read only

Former Member
0 Likes
436

Hi all...

U should use Logical Unit of Work(LUW)...

If luw starts set the lock mechanism ends release luw..