‎2007 Mar 23 7:43 PM
Hi,
One of ALV report runs for more than 15 minutes ,
Thru programatically i tried to terminate the running tcode use ENQUEUE_DELETE, but it not working. How can i terminate a running Tcode and also i need to restrict the running Tcode time thru ABAP.
I Know to how to terminate thru SM04, I am expecting possible way to kill the running Tcode and its time restriction?
Thanks
aRs
‎2007 Mar 23 7:47 PM
Hi,
Try to kill from the running window, go to top left corner and click on the folder icon and select stop transaction.
Otherwise please try transaction SM50.
Regards,
Ferry Lianto
‎2007 Mar 23 7:52 PM
Ferry,
Thanks for your reply.
I looking for ways to kill the Running Tcode programatically?
aRs
‎2007 Mar 23 7:55 PM
If you are not using ITS then just call this function -ITS_END_SESSION.
Regards,
Amit
‎2007 Mar 23 7:59 PM
Hi,
Try LEAVE PROGRAM or LEAVE TO TRANSACTION statement.
Regards,
Ferry Lianto
‎2007 Mar 23 8:02 PM
Hi All,
May be my question is not clear.
I am writing a report that search for all running tcodes that are running more 15 minutes and terminate that same.
I am looking for ways to do this programatically?
Thanks
aRs
‎2007 Mar 23 8:08 PM
Isn't there a BASIS setting that can be used to fix the limit for online & background runtime?
~Suresh
was thinking of this system profile parameter
<b>rdisp/max_wprun_time</b>
Message was edited by:
Suresh Datti
‎2007 Mar 23 8:09 PM
‎2007 Mar 23 8:18 PM
What you are essentially looking for is a functionality of SM04, select session and then select the individual transaction and kill. This is not available to you to put it in your custom code as the runtime process id of each such processes is hidden. You can look at the TH_* function modules but you may not achieve what you are looking for. Most of these are written as kernel functions.
It is very dangerous to automate something like that as there are even standard SAP transactions or jobs that run longer than 15 minutes. Is this a real requirement or an academic exercise?
‎2007 Mar 23 8:39 PM
Hi Srini,
We have lot of transactions that can be called thru web and also these can be run thru
gui frontend also. Some of SAP archieve reports runs more 15 minutes and it is creating numerous number of dialog processes in the server,
So we could not able to restrict users from running these reports, so we decide to before making a terminate we inform user by giving info message and delete the running tcodes.
Thanks
aRs
‎2007 Mar 23 8:59 PM
Is the problem created by the web calls or SAP GUI calls? I am not sure if this can be achieved purely by writing one program. You may need to look at performance tuning, built-in checks in your programs for volume of data read etc. Archiving and indexing can help in some cases. User education plays a lot of role in this as well. I once tried to kill sessions of users based on some criteria but I wasn't really successful. Check the TH* function modules as I mentioned. May be you will find some success.