Application Development 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: 

is it possible to lock and unlock a transaction?

Former Member
0 Kudos

Hi SDN,

Is it possible to lock and unlock a standard transaction( for eg VA02 ) through my program?( i am creating a customized version of standard transaction ) I want to lock the transaction for my user-id and then i will update the values in that transaction and finally i will unlock it.

I got the FM for locking at the database level.is there is any FM to lock and unlock the transaction?

8 REPLIES 8

Former Member
0 Kudos

Hi,

Only ur Basis people can do that for u.

Sudha

Former Member
0 Kudos

Hi,

If you lock the sales order using the ENQUEUE function module..Unless you release the lock..No body can go to VA02 to change the order..

Thanks,

Naren

Former Member
0 Kudos

Hi Niranjan,

i think there is no FM or BAPI.

Try Tcode SM01

Regards, Dieter

Former Member
0 Kudos

Hi..

Yes u can do that ..

Use SM01 transaction.

IN the last empty input field.. u enter the transaction u want.... and press enter.. then check the check box of that transaction name and press LOCK/UNLOCK.

Then this transaction will be locked..

reward if it is helpful

sai ramesh

former_member187255
Active Contributor
0 Kudos

Niranajan,

Function module ENQUEUE_ESFUNCTION will help you to Lock an abap program so that it cannot be executed.

From SE93 you will be able to find the program assigned to your customized version of standard T code.

Check this it may help you........

<a href="http://sap.ittoolbox.com/groups/technical-functional/sap-basis/lockunlock-tcode-in-background-629785#">Lock/Unlock</a>

ferry_lianto
Active Contributor
0 Kudos

Hi,

It may not be the best way, but maybe you could use the functionality behind transaction code SM01. Here you can lock/unlock the transaction code. If you look at the program, all it is really doing is updating table TSTC field CINFO. CINFO = 80 when unlocked, CINFO = A0 when locked. You could just update the field accordingly and then call this function module right after.


* For locking
CALL FUNCTION 'RSAU_WRITE_SM01_LOG'
  EXPORTING
    TCODE = TSTC-TCODE
    LOCK = 'X'.

* For unlocking
CALL FUNCTION 'RSAU_WRITE_SM01_LOG'
  EXPORTING
    TCODE = TSTC-TCODE
    UNLOCK = 'X'.

Regards,

Ferry Lianto

Former Member
0 Kudos

hi,

This will work.

Use transaction sm01 to find the transaction and lock/unlock it.

sri

Former Member
0 Kudos

Hi ,

The transaction can be locked using the through SM01 , but when you lock a transaction using SM01 it will not be accessible to anyone unless you unlock the transaction again.

Regards,

Sowmya.