Lock Mechanism
Following are the two main functions accomplished with the lock mechanism:
- A program can communicate with other programs about data records that it is just reading or changing.
- A program can prevent itself from reading data that has just been changed by another program.
Creating Lock Objects
Step 1 − Go to transaction SE11. The following screen opens.
Step 2 − Click ‘Lock Object’ radio button. Enter the name of lock object starting with E and click the Create button. Here we use EZLOCK12.
Step 3 − Enter the short description field and click on Tables tab.
Step 4 − Enter the table name in Name field and select the lock mode as Write Lock.
Step 5 − Click on Lock parameter tab, the following screen will appear.
Step 6 − Save and activate. Automatically 2 function modules will generate. To check function modules, we can use Go to → Lock Modules.
Step 7 − Click Lock Modules and the following screen will open.
The lock object is created successfully.
The key fields of a table included in a Lock Object are called lock arguments and they are used as input parameters in function modules. These arguments are used to set and remove the locks generated by the Lock Object definition.
No comments:
Post a Comment