Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query an element's lock status

Former Member
0 Likes
578

Hi experts,

I met a problem, seek for your help. Thanks.

Question is, I want to query if an element has already been enqueued in other sessions(may be both by other users or me).

The element is a structure-guy. I can get the lock argument and use the function-module enqueue_read. But it can not distinguish the lock of mine which is valid?

Anyone can help me? Many thanks!

BR, Richard.

Hi experts,

I met a problem, seek for your help. Thanks.

Question is, I want to query if an element has already been enqueued in other sessions(may be both by other users or me).

The element is a structure-guy. I can get the lock argument and use the function-module enqueue_read. But it can not distinguish the lock of mine which is valid?

Anyone can help me? Many thanks!

BR, Richard.

2 REPLIES 2
Read only

Former Member
0 Likes
534

Hi,

Unfortunately there is no such listner in SAP. SAP keeps track of the changes at an object level for most of the objects(like sales orders or material master etc). SAP does have database level logging on some individual tables. Imagine having to monitor and register all the database updates to tens of thousands of tables in SAP. It is impractical and consumes lot of database space to keep the change logs.

A more appropriate thing to do is specify which objects you are interested in monitoring and see if they can be monitored. If you have such specific objects in mind, let us know. If you want to monitor the whole database as such, then I would recommend looking into the tools provided by underlying database(like Oracle) itself.

<b>Reward points</b>

Regards

Read only

0 Likes
534

Hi skk,

I'm afraid you misunderstood me.

for example, in SM12, there's a lock with E mode '12345' for a structureby user yzz (i mean logical lock, not DB table lock), then, if i use user abb, i can not lock '12345' , i would get a foreign lock exception when i tried to enqueue'12345', right?

now come to what i want, i want to know in program that this 12345 is locked, without tring to enqueue it.

many thanks..... you are expert

BR, Richard.