03-12-2007 4:04 PM
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?
03-12-2007 4:19 PM
03-12-2007 4:22 PM
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
03-12-2007 4:28 PM
Hi Niranjan,
i think there is no FM or BAPI.
Try Tcode SM01
Regards, Dieter
03-12-2007 4:32 PM
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
03-12-2007 5:29 PM
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>
03-12-2007 5:37 PM
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
03-13-2007 3:21 AM
hi,
This will work.
Use transaction sm01 to find the transaction and lock/unlock it.
sri
03-13-2007 3:53 AM
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.