11-14-2007 8:03 PM
Hi,
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'
EXPORTING
mode_ztable = 'X'
field1 = itab-field1
field2 = itab-field2
EXCEPTIONS
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.
Thanks
11-14-2007 8:06 PM
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.
Regards,
Naimesh Patel
11-14-2007 8:06 PM
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.
Regards,
Naimesh Patel
11-14-2007 8:15 PM
Yes - SAP locking is logical not physical (at the database level). SM30 doesn't know anything about your lock object unless you add it to the table maintenance generator.
Rob