<?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: before calling an external program, check if the program is allready open in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/before-calling-an-external-program-check-if-the-program-is-allready-open/m-p/2140690#M450909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use the ABAP Coverage Analyzer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a function module we use to limit the execution of a program to one instance at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: PRG LIKE INDX-SRTFD. PRG = SY-CPROG.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_ESINDX'&lt;/P&gt;&lt;P&gt;EXPORTING RELID = 'ZZ'&lt;/P&gt;&lt;P&gt;SRTFD = PRG&lt;/P&gt;&lt;P&gt;SRTF2 = 0&lt;/P&gt;&lt;P&gt;EXCEPTIONS FOREIGN_LOCK = 1&lt;/P&gt;&lt;P&gt;SYSTEM_FAILURE = 2.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE: / 'ERROR: Program Is Already Running'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Program', PRG, 'has been stopped. Rerun in 1 minute.'.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: / '&lt;STRONG&gt;OK&lt;/STRONG&gt; ',PRG.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2007 04:40:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-11T04:40:55Z</dc:date>
    <item>
      <title>before calling an external program, check if the program is allready open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/before-calling-an-external-program-check-if-the-program-is-allready-open/m-p/2140689#M450908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to call an external program to print some labels, so i will use function WS_EXECUTE or the new one DSVAS_DOC_WS_EXECUTE_50 to call my program, but the problem that i have is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I call this function, the program open a small window, and if i have to call it again, it will open another window, and so on... obviously this is not a good solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any one how knows how can i close the program, of perhaps it is enough if there is some way to know if the program is already open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;Miriam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 11:13:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/before-calling-an-external-program-check-if-the-program-is-allready-open/m-p/2140689#M450908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T11:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: before calling an external program, check if the program is allready open</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/before-calling-an-external-program-check-if-the-program-is-allready-open/m-p/2140690#M450909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use the ABAP Coverage Analyzer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a function module we use to limit the execution of a program to one instance at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: PRG LIKE INDX-SRTFD. PRG = SY-CPROG.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_ESINDX'&lt;/P&gt;&lt;P&gt;EXPORTING RELID = 'ZZ'&lt;/P&gt;&lt;P&gt;SRTFD = PRG&lt;/P&gt;&lt;P&gt;SRTF2 = 0&lt;/P&gt;&lt;P&gt;EXCEPTIONS FOREIGN_LOCK = 1&lt;/P&gt;&lt;P&gt;SYSTEM_FAILURE = 2.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE: / 'ERROR: Program Is Already Running'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Program', PRG, 'has been stopped. Rerun in 1 minute.'.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: / '&lt;STRONG&gt;OK&lt;/STRONG&gt; ',PRG.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 04:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/before-calling-an-external-program-check-if-the-program-is-allready-open/m-p/2140690#M450909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T04:40:55Z</dc:date>
    </item>
  </channel>
</rss>

