Lock table does not work
I have a table (own development) that we use to save some data ...
In one of our programs we will need to change the data of some records. So, one of my colleagues created a lock-object to use ... There is also the generated function to lock the table ...
As possible test I open the table with SM30 and in my program I try to lock the table. Unfortunately this seems to be possible ... The function returns with sy-subrc 0, which means that the lock was executed ?
I don't understand why this is working ? In SM12 I see that the table is locked, but I still can lock it with the function in my program ?
Does anyone knows an explanation for this ?
Thanks in advance !
Locks only work when everybody use the same locking mechanism e.g. the same lock name and key-fields. because only then the program can see if a lock exists. so if the lockname is different from the SM30 then the one that has been made by your colleague, two locking mechanisms are working. and since this is NOT a real DB-lock, it will not work.