I am trying to know if it is possible to question the system to know if an object is locked or no ?
I can used ENQUEUE_xxxxx function and it would return a SY-SUBRC depending on the lock status of my object. But this will also lock the object. I just want to query whether the object is lock or not. Is there a Function/System Function that exist for such a thing.
My business case is an interface with a portal. Before going foward in a process they want to see if a certain PO is locked or not. They don't want to lock until the BAPI BAPI_PO_CHANGE is called because they say that they can't control the user using the portal. This will at least tell the user that the PO, that they are trying to modify via the portal, is currently being modified by another user. They still run the risk that when they save their modification, somebody else will have lock the PO but this is a risk that they are willing to take. This process is very questionnable ! 😊
I browsed around, I also debugged a Function ENQUEUE_xxxxx and I can see they are using the C_ENQUEUE system function but there is no documentation no where on it.
So to repeat my initial request, is there anyway to know if an object is lock or not without locking it using the ENQUEUE_xxxxx function ?
The other way would be to use an ENQUEUE followed right away by a DEQUEUE but I am wondering if there is a better way ?
They might change the process too but for now, I am stuck with that.