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

lock object

Former Member
0 Likes
725

what is a lock object ?

and what is it's use in real time ?

thanks

mahya

5 REPLIES 5
Read only

Former Member
0 Likes
700

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules. These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

The tables in which data records should be locked with a lock request are defined in a lock object together with their key fields. When tables are selected, one table (the primary table) is first selected. Further tables (secondary tables) can also be added using foreign key relationships.

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

Read only

uwe_schieferstein
Active Contributor
0 Likes
700

Hello Mahya

If your application will change value in a DB table then you must lock the table (or at least the modified entry) against concurrent changes. If you do not lock and two user concurrently change the same table entry then the table entry will contain only the changes of the user that saved the data last.

If, for example, you change a debitor (XD02) and call a second screen and want to change the same debitor again the system will tell you that this debitor is already locked.

Therefore, locking is a crucial part of any application that changes DB table entries.

Regards

Uwe

Read only

Former Member
0 Likes
700

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules . These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

chk this for the function modules

http://help.sap.com/saphelp_nw2004s/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm

Read only

Former Member
0 Likes
700

Hi,

As generally i will explain what's the use of Lock objects in Real time.

LOCK OBJECT : The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

<b>Actually, when ever you want to update database tables, at that point of time, no other person should do any operation on that DB table. To do this , we will lock the DB object untill our operation is completed. To do this we will use LOCK OBJECTS.</b>

Thanks

Manju

Read only

Former Member
0 Likes
700

HI

The R/3 System synchronizes simultaneous access of several users to the same data records with a LOCK MECHANISM.Two owners, who can set locks, are created at the beginning of an R/3 transaction.

When interactive transactions are programmed, locks are set and released by calling function modules .These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

STRUCTURE:

The tables in which data records should be locked with a lock request are defined in a lock object together with their key fields. When tables are selected, one table (the primary table) is first selected. Further tables (secondary tables) can also be added using foreign key relationships

USE:

The main use of locks is to secure the information created,so that the lock owners will have the permission to modify.We have two functions ENQUEUE and DEQUEUE to set and release locks.

Regards,

Gunasree.