<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Locking a work process for exclusive access in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786481#M1465322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; One possibility is to use LOCK: according to SM50 one of the work process reasons for waiting is called 'LOCK' and its documentation is "Work process assigned exclusivel to one user for system analysis".&lt;/P&gt;&lt;P&gt;&amp;gt; I figured it might be useful to use this LOCK status but I don't know how it is done, probably some kernel call - if anyone knows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The status is not 'lock', it's 'hold' with the reason 'lock'. You can accomplish the same effect, if you force the process into debug-mode. Have a look at the taskhandler functions. There might be something you can use. SE37, TH_*.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Mar 2010 08:44:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-24T08:44:16Z</dc:date>
    <item>
      <title>Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786480#M1465321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a special need for a an ABAP program, to run on the very same dialog work process during all the steps of its execution. The program normally has multiple dialog steps. Additionally, I need that work process to be dedicated to my program exclusively so no other programs will use it until my program terminates - it should be idle between my program dialog steps and not serve other programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had one idea of implementing it, which will probably work - intentionally consume large bulks of memory as the program starts and then the work process will switch to private mode (PRIV) and will be exclusive until my program terminates.&lt;/P&gt;&lt;P&gt;Apart from being very inelegant, this approach has major drawbacks:&lt;/P&gt;&lt;P&gt;1. It is not exactly clear how much memory should I consume&lt;/P&gt;&lt;P&gt;2. It is not healthy for the application server&lt;/P&gt;&lt;P&gt;3. Consuming large amounts of memory takes a long time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm searching for alternatives.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possibility is to use LOCK: according to SM50 one of the work process reasons for waiting is called 'LOCK' and its documentation is "Work process assigned exclusivel to one user for system analysis".&lt;/P&gt;&lt;P&gt;I figured it might be useful to use this LOCK status but I don't know how it is done, probably some kernel call - if anyone knows how to accomplish this it would be fantastic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other alternatives you guys suggest would be also very welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 07:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786480#M1465321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T07:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786481#M1465322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; One possibility is to use LOCK: according to SM50 one of the work process reasons for waiting is called 'LOCK' and its documentation is "Work process assigned exclusivel to one user for system analysis".&lt;/P&gt;&lt;P&gt;&amp;gt; I figured it might be useful to use this LOCK status but I don't know how it is done, probably some kernel call - if anyone knows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The status is not 'lock', it's 'hold' with the reason 'lock'. You can accomplish the same effect, if you force the process into debug-mode. Have a look at the taskhandler functions. There might be something you can use. SE37, TH_*.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 08:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786481#M1465322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T08:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786482#M1465323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dror,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, there is a possibilty to lock a workprocess but one normally don't need this option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you want your program to stick to one workprocess only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dispatcher will assign the program (user context) to the same&lt;/P&gt;&lt;P&gt;workprocess once it is rolled in again after the roll out whenever this is possible.&lt;/P&gt;&lt;P&gt;In high load situations this might not be possible and the user context might be assigned&lt;/P&gt;&lt;P&gt;to a different workprocess or even might  have to wait until a workprocess becomes free.&lt;/P&gt;&lt;P&gt;But then we are in performance trouble any way... the whole system. Such situations should&lt;/P&gt;&lt;P&gt;be fixed by other means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally your program should use the same workprocess between the steps. In high load&lt;/P&gt;&lt;P&gt;situations it might use a different one. In overload situations it might have to wait.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The overlaod has to be fixed by other means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So why do wou want to lock a workprocess exclusively to your program? What is the&lt;/P&gt;&lt;P&gt;reason? This should not be necessary....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 08:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786482#M1465323</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-24T08:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786483#M1465324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hermann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;The reason I want my program to stick to the same work process is that I need to inspect some of the developer traces for the program execution. I want my program to activate the trace, carry out its logic, deactivate the trace and then to analyze it. Since the traces are at work process level, this requires that a) my program runs on the same process and b) no other program uses this process.&lt;/P&gt;&lt;P&gt;In any case this program is intended to run only in QA environments and never in production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clarifies why I want to lock the work process.&lt;/P&gt;&lt;P&gt;Could you elaborate on how this can be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind help.&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 12:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786483#M1465324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786484#M1465325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dror,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hm, as I sad, if your QA is not overloaded your program should stay on the same workprocess, however:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to make the program run exclusively on a workprocess you have to do the following manual steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- in SE38, start pogram RSTRC000&lt;/P&gt;&lt;P&gt;- mark "Keep Work porcess with "X"&lt;/P&gt;&lt;P&gt;- click "save"&lt;/P&gt;&lt;P&gt;- confirm "Work process &amp;lt;nn&amp;gt; locked"&lt;/P&gt;&lt;P&gt;- start your program in the same mode: &lt;/P&gt;&lt;P&gt;-- /nse38 - your program execute&lt;/P&gt;&lt;P&gt;--/nyourta - for your transaction&lt;/P&gt;&lt;P&gt;--/o... will not work (opens a new mode)&lt;/P&gt;&lt;P&gt;- if your program is finished go to se38 agan in the same mode (/nse38)&lt;/P&gt;&lt;P&gt;- start RSTRC000 again &lt;/P&gt;&lt;P&gt;- remove the "X" and click "save"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While the process is locked you can see status LOCKED in SM50 (you can doublecheck from &lt;/P&gt;&lt;P&gt;a second mode /osm50 once you clicked save in RSTRC000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While locked the workprocess is bound to your user mode (not only the program as you can see above but to your mode where you locked the process), therefore, don't do this in a productive system... .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i guess with or without this procedure the result should be the same since your progream should use only one &lt;/P&gt;&lt;P&gt;workprocess anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 12:29:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786484#M1465325</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-24T12:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Locking a work process for exclusive access</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786485#M1465326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hermann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work perfectly! Many thanks for your prompt assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 13:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-a-work-process-for-exclusive-access/m-p/6786485#M1465326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T13:48:33Z</dc:date>
    </item>
  </channel>
</rss>

