cancel
Showing results for 
Search instead for 
Did you mean: 

How to LOCK a table in SAP?

Former Member
0 Kudos

Hi,

Just wondering is there a way we can lock a table in SAP?

tcode or something?

ex. there a tcode to lock tcodes (SM01)

so wondering if there is a tcode or another method?

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Why you want to lock a table!! If you want that user can't access that table then do it via S_TABU_DIS.

Identify the Authorization group that table belongs to or you can create a new auth group and add all the table you don't want people to have access and don't give access to that auth group to those users.

Thats all you need to do!

Former Member
0 Kudos

Hello Gurdev,

You can set lock on a table using ABAP program.

1) create a lock object in ABAP dictionary for your table.

2) The SAP system will generate two function modules

ENQUEUE_<lock object name> and DEQUEUE_<lock object name>

3) You have to set or release SAP locks in your ABAP program by calling these function modules in a CALL FUNCTION statement.

Regards,

Ammey Kesarkar

Former Member
0 Kudos

Hi,

These are application locks not the database tables lock.

If you use this function modules (enqeue and dequeue)

then only it works the concept of locking.If you dont use this fms then you can directly access the table.

If I am the developer and I dont implement the locks then no locking concept would happen.

Regards,

Vamshi.

Former Member
0 Kudos

Agreed. Thanks for the correction.

Former Member
0 Kudos

Hi ,

You can use the options as stated above but really the transaction based locking mechanism like you have SM01 for transactions is not available in SAP. And it ain't so good an idea always.

Regards.

Ruchit.