‎2007 Mar 02 7:43 AM
suppose i'm doing two programs parallel,by using one program locked table..can i access the table by using another program?
‎2007 Mar 02 7:47 AM
Hi,
No u cant ... after the lock is released then only the second program will be able to access that table for writing...
The SAP system is equipped with a special lock mechanism that synchronizes access to data on the database. The purpose of the lock mechanism is to prevent two transactions from changing the same data on the database simultaneously.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
- Optimistic lock
Optimistic locks initially behave like shared locks and can be converted into exclusive locks.
You can create a lock on a object of SAP thorugh transaction SE11.
Have a look at below links. It will help you surely.
http://help.sap.com/saphelp_nw04s/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Cheers,
Simha.
‎2007 Mar 02 7:47 AM
Hi,
No u cant ... after the lock is released then only the second program will be able to access that table for writing...
The SAP system is equipped with a special lock mechanism that synchronizes access to data on the database. The purpose of the lock mechanism is to prevent two transactions from changing the same data on the database simultaneously.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
- Optimistic lock
Optimistic locks initially behave like shared locks and can be converted into exclusive locks.
You can create a lock on a object of SAP thorugh transaction SE11.
Have a look at below links. It will help you surely.
http://help.sap.com/saphelp_nw04s/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Cheers,
Simha.
‎2007 Mar 02 7:47 AM
hi,
It depends on the type of lock. whether it is a exclusive or shared
‎2007 Mar 02 7:48 AM
Hi ,
You can access the table but if it is locked , you will be able to read only.
Hope this helps
Sunil.M
‎2007 Mar 02 7:51 AM
hi Balu,
It depends on the type of lock that you are using for locking the table if it is exclusive lock ( E ) you can not ...
Regards,
Santosh
‎2007 Mar 02 7:57 AM
hi balu,
it depends on the lock u r using on the table.
Here is a small description on lock object.
The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.
Access by more than one user can be synchronized in the following ways:
Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
Check out this thread:
Regards....
Arun.