2007 Aug 23 11:56 AM
Hi,
please explain me how to create the Lock object for one table and how to call that function modules in program,
Thanks,
Hari.
Hi,
please explain me how to create the Lock object for one table and how to call that function modules in program,
Thanks,
Hari.
2007 Aug 23 12:00 PM
Hi Hari,
Lock Objects should start with EZ.
Eg : EZTEST
click create button and give the primary table name and give the lock mode and if needed give the secondary table names.
Awars points if this is helpful.
Regards,
Ravi G
2007 Aug 23 12:00 PM
Hi..
Goto SE11
Entern Lock Object Name : EZTAB1. (Should start with EZ or EY).
Select Create Button..
Enter the Primary Table (your ztable).
Save and Activate .
It will generate two FMs
1. ENQUEUE_EZTAB1 (To lock the record)
2. DEQUEUE_EZTAB1. (To release the Lock)
Using Pattern call these FMs in your program
<b>Reward if Helpful</b>
2007 Sep 11 7:40 AM
HI Verma,
thanks for the useful information. i am able to create lock onject for my table.
one thing i want to know is: can you briefly share the details about lock modes.
and when to use it...
regards,
Praveen
2007 Aug 23 12:02 PM
Hi Peeleti,
Go to Tcode SE11 select the Lock object button and enter the lock object name...
e.i ey... followed by table name. and press on the create button.
Later specify the table name and other properties to complete the creatation.
Then we can use the FM Enqueue_lock object and Dequeue_lock object in the program to lock the particular table.
Regards,
Satya
2007 Aug 23 12:02 PM
Hi,
Goto SE11 -->select lock object --> specify any name starting with E and specify the tables and fields which you want to lock and also lock mode.
It will create TWO FM ; one for enque and other to remove the lock : deque.
Call FM : ENQUEUEname and write the logic and once done call FM : DEQUEUEname
..
*reward if useful
2007 Aug 23 12:52 PM
HI,
For creating lock objects
Go to SE11 and create the lock object starting with E and give that table name.
In the program call the FM
as below.
CALL FUNCTION 'ENQUEUE_EZ_ZFA_HEADER' ( EZ_ZFA_HEADER' lock obje)
EXPORTING
mode_/gmc/zfa_header = 'E'
mandt = sy-mandt
FATYPE =
FANUM =
X_FATYPE = ' '
X_FANUM = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3
Add the code for modify the database tables.
CALL FUNCTION 'DEQUEUE_EZ_ZFA_HEADER'
EXPORTING
mode_/gmc/zfa_header = 'E'
mandt = sy-mandt
FATYPE =
FANUM =
X_FATYPE = ' '
X_FANUM = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
At here EZ_ZFA_HEADER is the lockobject.
Lock objects are multi usable.
if already exist with that table name we can use that also no need to create new one.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |