‎2020 Jan 30 11:39 AM
untitled.jpgHi All,
I am trying to create lock object with lock mode V, i am getting error.
Lock mode V for table XXX is not allowed
Lock object XX is inconsistent
Please find screen shot.
With Regards,
Sunny.
‎2020 Jan 30 12:18 PM
I think you should open the lock object in SE11 and then use the check button should tell you what inconsistency is found on your lock object. That could perhaps tell you what to change and hopefully fix your issue. In the documentation here I don't find any reference to lock mode 'V', so perhaps you should consider using another lock mode?
‎2020 Jan 30 1:53 PM
It's not very surprising that V is not allowed inside a lock object, because V is just a check lock mode (to test whether a lock exists), which means that there must be a real lock mode too (otherwise there will never be any lock), which is to be defined in the lock object.
That said, V being the test counterpart of the E lock mode. So, define E in the lock object, and in your ABAP program, call the enqueue function with V mode to check for existing locks.
More information in SAP Library - Example: Using the Check Lock Modes.