lock table problem
I created a lock object so that I can lock a table at row level. After running the program(a T-Code), the related row(based on the fields) locked by calling function ENQUEUE_EZABC. If another user run this program at same time, the user can not access the row which I locked. Works fine.
Here is the ENQUEUE_EZABC
CALL FUNCTION 'ENQUEUE_EZABC'
mode_ztable = 'X'
field1 = itab-field1
field2 = itab-field2
foreign_lock = 1
system_failure = 2
OTHERS = 3.
But, if the user runs SM30(or other program which uses this table) to maintian this table, the user still can access all rows and can edit(delete or insert) them. That means there is no lock at all.
Why? By the way, the lock mode is E.
Naimesh Patel replied
SM30 uses its own locking machnism. if you have marked , you can LOCK the entire table only, you can not lock at the record level.
For your other zprograms you need to apply the locking mechnism by calling the FM 'ENQUEUE_EZABC' and DEQUEUE_EZABC in each and every program.