what is the use of lock object??

Answer Posted / syed

Hi

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.

You can create a lock on a object of SAP thorugh
transaction SE11 and enter any meaningful name start with
EZ Example EZTEST_LOCK.

Use: you can see in almost all transaction when you are
open an object in Change mode SAP could not allow to any
other user to open the same object in change mode.

Example: in HR when we are enter a personal number in
master data maintainance screen SAP can't allow to any
other user to use same personal number for changes.

Technicaly:
When you create a lock object System automatically creat
two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a
queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being
queued through above FM.

You have to use these function module in your program

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different buffering methods?

580


A function module can be called from a transaction screen outside an abap/4 program. State true or false. : abap modularization

559


How do you use tab sets in layout sets?

655


What is the maximum No. Of structures that can be included in a table or structure. : abap data dictionary

618


what next in SAP-ABAP/4 is it going to be change?

1653






What are the check tables?

559


What are critical issues you have faced in your project

2916


How move-corresponding works

931


What is database utility? : abap data dictionary

594


How can we create callable modules of program code within one abap/4 program? : abap modularization

604


What are the 3 types of function modules in sap?

608


Mention some important events in abap programming.

584


What are the advantages and disadvantages of using views in abap programming ?

647


What is the difference between synchronous and asynchronous updates?

603


What is the function module to popup contents in the internal table?

560