‎2007 Dec 17 7:48 AM
‎2007 Dec 17 7:59 AM
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
Regards,
omkar.
‎2007 Dec 17 7:54 AM
Hi Deniz,
in SE11, enter name for lock object like EZ....
Follow the steps.
Regards,
Clemens
‎2007 Dec 17 7:55 AM
Hi,
Check the below link .
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm
Reagrds,
nagaraj
‎2007 Dec 17 7:59 AM
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
Regards,
omkar.
‎2007 Dec 17 8:14 AM
Hi,
You open SE11 tcode and choose Lock Object Radio button and enter lockobject name but first 2 chars should be "EZ" ( suppose if you are creating lock object for ZMAIN table for field1 means name can be EZ_MAIN_FIELD1 ) press create button.
Enter text for lock object.Like Lock object for MAIN_field1.
This is just description.
Then Goto tables option and provide your table name means to which table you are locking.
Like we give ZMAIN and press enter.
you give type of locklock mode whether it can be shared /Exclusive lock (cant be shared)..etc.
In Lock Parameter option you choose field1 if it is available ( It will be available if it primary key in database table ) and then save & activate.
Now for you 2 fms are created by system automatically.
names started with ENQUEUE_EZ_MAIN_FIELD1
& DEQUEUE EZ_MAIN_FIELD1.
So ENQUEUE_EZ_MAIN_FIELD1 ,you can use for locking the table from updation .
DEQUEUE_EZ_MAIN_FIELD1 is used to release the lock .
so any one can do updation when the lock is released.
you call these fms in your program and pass parameter to this fm in place of field1 = itab-field1.
here iam giving sample code.Please look into one once.
CALL FUNCTION 'ENQUEUE_EZMDEMAIN'
EXPORTING
mode_zmdemain = 'E'
mandt = sy-mandt
serial_no = p_value
x_serial_no = ' '
_scope = '2'
_wait = ' '
_collect = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
For releasing lock ::::::::::::::::::::::::::::::::::::::
call function 'DEQUEUE_EZMDEMAIN'
exporting
mode_zmdemain = 'E'
mandt = sy-mandt
serial_no = zmdemain-serial_no
x_serial_no = ' '
_scope = _dscope
_synchron = ' '
_collect = ' '.
Thanks
Sivaparvathi
Please reward with points if helpful........