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

Locking Issue

Former Member
0 Likes
2,228

Hi Experts,

Is there any chance to release locks explicitly set by SAP itself?

That means when we r accessing database locks are set by SAP.i need to release these locks explicitly.

Thanks in Advance

8 REPLIES 8
Read only

Former Member
0 Likes
1,470

Hi Siva,

The database objects or any programs can be released from locks by using transaction SM12

When u go to this transaction it lists you the objects being edited for a particular user given in the selection criteria. By selecting the objects in the list you can unlock the object.

Thanks,

Shailaja

Read only

Former Member
0 Likes
1,470

Ya, by the transaction SM12 we can unlock.

khadeer.

Read only

Former Member
0 Likes
1,470

Hi siva,

1. Go to SM12 transaction.

2. Click on List tab.

3. Then select the object whose lock u want to release.

4. then click on delete lock .

Lock will be relesed.

<REMOVED BY MODERATOR>

Thanks

Satyam

Edited by: Alvaro Tejada Galindo on Jul 9, 2008 12:01 PM

Read only

Former Member
0 Likes
1,470

Hi Siva,

To release the locks, go for the transaction code. SM12.

This transaction code will display all the LOCK entries.

Select the required lock entry.

Delete the lock record, it will deleted and lock will be released.

OR

Using Programs:--

Go for SE11.....create one lock object with EY_ or EZ_ name convesion: eg EYLOCK1

Two function modules will be created

1) Enqueue (ENQUEUE_EYLOCK1 function module): to lock.

*2) Dequeue (DEQUEUE _EYLOCK1 function module)*: to release the lock.

call these function modules into your program and provide all the required parameters.

I think FIRST ONE will suit your requirement more.

With Regards,

Rupinder

Read only

0 Likes
1,470

Hi All,

Thanks for ur Replies.

But enduser don't want to use SM12 every time. Is there any chance of releasing locks during runtime?

Thanks,

Read only

0 Likes
1,470

HI,

Write a custom program which will execute periodically!!!

Fist check at Fm ENQUEUE_READ to read locked arguments. In this it will return the lock arguments based on user level.

Call function ENQUEUE_READ by passing client no .Now it will return the lock arguments. If you want base on user level then pass Guname = sy-uname into FM. While return, it will return the table name in GNAME.

By using this GNAME call ENQUEUE Fm dynamically.

I hope this solves your problem.

Rgds,

Raghu

Read only

0 Likes
1,470

Locks are set by SAP for a reason ie to try and ensure data consistency. End users should not be manually releasing locks set by SAP on a regular basis. Or at all, really.

Read only

Former Member
0 Likes
1,470

Hi Siva.

GoTo->SE03(Transport Organizer Tools)->Request/Tasks->Unlock Objects.

Good Luck.

Harsh