<?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 one program if another is running .... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002277#M709284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnendu Laha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Thanks for the reply. When I tried to use this FM, the FM is taking only that program itself into consideration. &lt;/P&gt;&lt;P&gt;for Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I passed the PRG 2 to the Function module, run the PRG 2 and after that I run the PRG 1 in which I am calling that FM. Even the PRG2 was running it was not giving the SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly for the same coding as above, when I run the PRG 1 and after that again I run the PRG 1. Now the FM is working properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means this FM is only for the same program and not for the other program. I need to chcek the other program running or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there something we are not passing to the FM and because of which we are getting this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Nov 2007 10:29:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-13T10:29:46Z</dc:date>
    <item>
      <title>Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002274#M709281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               I have came across a situation, before executing one program, i have to check weather other program is running or not. &lt;/P&gt;&lt;P&gt;               Lets say I have 2 programs, program 1 and program 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If I want to run the pg 1, in foreground, I have to check weather prg 2 is running either in foreground or in background. If it is running in both the conditions, I have to raise an error message at the time of execution of prg 1 itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If I want to scedule the prg 1. At the time of its execution in background, it should check that prg 2 is not running at all (neither foreground nor background). If the prg 2 is running, prg 1 should, either wait till prg 2 gets executed or get rescheduled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide me your valuable suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ganesh V Khumse.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 09:28:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002274#M709281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T09:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002275#M709282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all these below problems we have to use function module &amp;lt;b&amp;gt;'ENQUEUE_ESINDX'&amp;lt;/b&amp;gt;, pass program name; if sy-subrc ne 0 then someone is running the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is sample code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'ENQUEUE_ESINDX'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      MODE_INDX      = 'E'&lt;/P&gt;&lt;P&gt;      MANDT          = SY-MANDT&lt;/P&gt;&lt;P&gt;      SRTFD          = 'program name'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      FOREIGN_LOCK   = 1&lt;/P&gt;&lt;P&gt;      SYSTEM_FAILURE = 2&lt;/P&gt;&lt;P&gt;      OTHERS         = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 09:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002275#M709282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T09:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002276#M709283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call function 'ENQUEUE_READ'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              gclient = gclient&lt;/P&gt;&lt;P&gt;              guname  = guname&lt;/P&gt;&lt;P&gt;              gname   = gname&lt;/P&gt;&lt;P&gt;              garg    = garg&lt;/P&gt;&lt;P&gt;         importing&lt;/P&gt;&lt;P&gt;              subrc   = subrc&lt;/P&gt;&lt;P&gt;         tables&lt;/P&gt;&lt;P&gt;              enq     = enq&lt;/P&gt;&lt;P&gt;         exceptions&lt;/P&gt;&lt;P&gt;              others  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above fn module helps to read the lock entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 09:57:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002276#M709283</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2007-11-13T09:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002277#M709284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishnendu Laha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Thanks for the reply. When I tried to use this FM, the FM is taking only that program itself into consideration. &lt;/P&gt;&lt;P&gt;for Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I passed the PRG 2 to the Function module, run the PRG 2 and after that I run the PRG 1 in which I am calling that FM. Even the PRG2 was running it was not giving the SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly for the same coding as above, when I run the PRG 1 and after that again I run the PRG 1. Now the FM is working properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means this FM is only for the same program and not for the other program. I need to chcek the other program running or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there something we are not passing to the FM and because of which we are getting this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 10:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002277#M709284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T10:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002278#M709285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have to use&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_ESINDX'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;twice. i.e. in prog1 with the progname prog1 and in prog2 with same progname i.e. prog1.&lt;/P&gt;&lt;P&gt;i.e. use same coding in two prog with same progname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when prog1 is running you can not run prog2.&lt;/P&gt;&lt;P&gt;check it may work.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 10:56:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002278#M709285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T10:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002279#M709286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiba,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             I think it is working now. Thanks ..... but can you give me a favor and explain it why it is happening like that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Things are working but I didn't get the exact logic behind it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks.&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 11:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002279#M709286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T11:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002280#M709287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think when you are locking the prog1 by enque fm then it will not release the lock until it process completely. So if in prog2 again you are trying to lock it it will return the sy-subrc ne 0. But you can face some problem when prog2 will also run then you cant run prog1 also. Because in prog2 also you are locking the prog1 as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 03:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002280#M709287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T03:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Locking one program if another is running ....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002281#M709288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiba,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Things are clear now. Thanks for your replay and anyway I think I willl not get any probelm, because I have to it like that only, I mean if prg 1 is running it should not run prg2 and VICE VERSA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          So it is working for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 06:37:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-one-program-if-another-is-running/m-p/3002281#M709288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T06:37:31Z</dc:date>
    </item>
  </channel>
</rss>

