最近经常有abap问关于锁的问题,我特此收集了一些资料,供大家参考,也请大家指正。
1.sap锁的概念
sap为了同步同时多个用户操作同一数据,防止数据出现不一致性而采用了锁机制。一般 sap会在操作数据前设置锁,防止第二个用户进行修改操作,当操作结束后系统在释放锁。
2.SAP锁的类型
Exclusive lock
The locked data can be read or processed by one user only. A request for another exclusive lock or for a shared lock is rejected.
Shared lock
Several users can read the same data at the same time, but as soon as a user edits the data, a second user can no longer access this data. Requests for further shared locks are accepted, even if they are issued by different users, but exclusive locks are rejected.
Exclusive but not cumulative lock
Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected.
3.相关TCODE