cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table for Lock Objects - SM12

Former Member
0 Likes
20,711

Hi,

I want to know the table that holds the LOCK OBJECTS that are created. Or any explanation, where lock objects are stored and can be monitored. Recently, there were over 2,000 lock ojects got created which made the our R/3 (4.7) system. What is the best way to monitor this besides SM12.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

I don't think that the lock data is stored in some database table, it is held in shared memory at runtime as long as the application server is running. But if you want to automate the monitoring, I am not sure if SAP provides a ready-made solution for that, but you can definitely create a customn ABAP program where you can use the FM provided by SAP to read the lock data and the based on your requirements send an external email to a list of user of the total locks exceeds a particular limit.

Former Member
0 Likes

HI Satinder,

Do you know what FM is that?

thanks

Former Member
0 Likes

Hello Naved,

I would also like to think that the lock table is something that exists in the shared memory of the application servers , rahter than in the ABAP dictionary.

However, I have the following pointers which I hope you will find useful -

1. Go to this link in the SAP Documentation. It contains the detailed and easy-to-understand explanation of the SAP Lock Concept. It also tells you why some of the most common problems with locks occur and how they can be tackled.

http://help.sap.com/saphelp_erp2004/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm

2. Regarding the Function Module that you have asked for,

the function group SENT contains some function modules and utilities for the SAP Lock Concept. Of particular interest to us are the two FMs ENQUE_REPORT and ENQUEUE_REPORT. I have not researched thoroughly as to the functionalitites of these two FMs and I'm leaving that for you to pursue.

You might want to write a customized report using one (or both?) of these FMs and trigger a workflow / external email based on the tolerance levels of your choice.

Hope this information helps you solve the problem. Please do get back to me in case you have some other doubts regarding this.

Regards,

Anand Mandalika.

Former Member
0 Likes

Hi Anand,

Thanks for your response. The link is very helpful. Do you happen to have a sample code to read the function module enqueueread.

Also, in SM12 when I click on Extras--> Statistics; nothing happens: SM12 Screen has following entries when I try to run Statistics :

Tablename <blank>

LockArgument<blank> Client 010

Username*

We are on 4.7.

Thanks

Message was edited by: Naved Rehman

Message was edited by: Naved Rehman

Former Member
0 Likes

Hi,

Please tell me what is the name of the FM?

Thanks in Advance

Priya

Answers (4)

Answers (4)

Former Member
0 Likes

Hi

I think these tables will solve your query.

1. seqg3. " Enqueue-Dialog-Fields

2. seqg4. " additional Enqueue-List-Fields

Thanks

Khushboo

Former Member
0 Likes

Hi,

The FM name is



ENQUEUE_READ


In the parameter GUNAME, pass blank or * so that all locks (of other users also) are fetched.

Regards,

Amit Mittal.

Former Member
0 Likes

Hello,

Please check the thread

Former Member
0 Likes

Hi all,

please use functon module ENQUEUE_READ if you think it would be necessary to read lock table contents.

NEVER use function modules such as ENQUE_READ or ENQUE_REPORT !!!

The ENQUE_READ and ENQUE_REPORT FMs are for internal use only and might be removed or changed without announcement. They only work correcly a special environment which cannot be guaranteed by application programs. They definitely fail in an incorrect environment.

Reading the content of the lock table should be used for monitoring purpose only.

We advise not to implement a locking strategy on the application level which implies the reading of lock table contents. In all likelihood it will be unsafe and cause performance problems. For a safe, fast and scalable solution we advise to use atomic locking operations for check/decide/modify sequences. Use of locks with generic arguments, multi-granule-locks, optimistic locks, etc. are helpful to get a better implementation.

Regards,

Guenter

Former Member
0 Likes

Hi Guenter,

Thanks for your response.

What is (and how to use) 'atomic locking operations for heck/decide/modify sequences. '

We are on 4.7.

Thanks

Message was edited by: Naved Rehman