‎2011 Aug 10 12:52 PM
Hi,
I have a report Z_TEST and it has been assigned to t-code ZTEST. Users should not be able to execute the same transaction while it is being running by other user or same user (should restrict parallel execution). Kindly let me know if there is any possible solution for this. I can not implement the LOCK/UNLOCK concepts since, the proram can be terminated at any point or any time and not able to figure out where the UNLOCK should happen. And this has to be dont for several programs hence, looking for some table or function module where we can find out which t-code/program is current in execution/running to write a generic function module/subroutine.
Note: We can do this if the report is scheduled to run in background. But I have to implement this logic for foreground execution.
Please let me know how we can implement this.
Thanks,
Amal
‎2011 Aug 10 1:19 PM
Hi,
You please go to SM12 for lock entries , based on your username u get get the details who is using the particular Tcode.
Otherwise you have to implement Lock concept. Shared lock will be more preferable..
Regards
Abdul
‎2011 Aug 10 1:24 PM
Hello,
You can make use of the FM 'TH_USER_LIST' to get the details of the user sessions. This FM uses the same kernel call as in t-code SM04.
BR,
Suhas