‎2018 Apr 17 2:07 PM
Hi Experts,
I have an issue with lock object for material data. In my report i am using below logic for material locking purpose but issue is when I am uploading material classification data and parallely i am in MM02 with that material in this time system not allowing to update the data. if i am in MM02 basic data tab then system allowing me to update, Anyone having solution how to handle this kind of issue.
CALL FUNCTION 'ENQUEUE_MATERIAL'
EXPORTING
matnr = material
* WAIT = ' '
werks = plant
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Thanks.
‎2018 Apr 17 7:17 PM
Hi Ramesh,
Type of Lock regarding SAP concepts:
1.Shared lock/read lock S (shared):
More than one application can set a shared lock on the same record. An exclusive lock cannot be set for a record with an existing shared lock.
2.Exclusive lock/write lock E (exclusive):
Exclusive locks protect the lock object against all types of locks from any application. Only the application that locked the object can reset the lock. Locked data can be edited or displayed by a single user.
3.Exclusive and non-cumulative X (exclusive noncumulative)
Exclusive locks can be requested several times within the same application and are processed successfully. In contrast, exclusive but non-cumulative locks can be applied only once within an application; all other lock requests are rejected.
4.Below SAP link:
Regards,