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

is it possible to lock and unlock a transaction?

Former Member
0 Kudos
8,038

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?

10 REPLIES 10
Read only

Former Member
0 Kudos
4,931

Hi,

Only ur Basis people can do that for u.

Sudha

Read only

Former Member
0 Kudos
4,931

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

Read only

Former Member
0 Kudos
4,931

Hi Niranjan,

i think there is no FM or BAPI.

Try Tcode SM01

Regards, Dieter

Read only

Former Member
0 Kudos
4,931

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

Read only

former_member187255
Active Contributor
0 Kudos
4,931

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>

Read only

ferry_lianto
Active Contributor
0 Kudos
4,931

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

Read only

Former Member
0 Kudos
4,931

hi,

This will work.

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

sri

Read only

0 Kudos
3,554

Can we make it automated as per specific time to  lock/unlock the T codes 

Read only

Former Member
0 Kudos
4,931

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.

Read only

RaymondGiuseppi
Active Contributor
0 Kudos
3,533

@Sahiil , for recent versions look at SM01_CUST (and SM01_DEV) there are reports behind those transactions (e.g. RSAUDITC_BCE)  that can be scheduled with variants.