<?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: Program being processed by another user in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662874#M293665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The proposed solution will only tell me that the program is being executed by another user.&lt;/P&gt;&lt;P&gt;Is it possible to find out who the other user id is ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2006 20:29:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-08T20:29:20Z</dc:date>
    <item>
      <title>Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662870#M293661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a requirement in which a warning message should be displayed if the same program is being executed by another user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know incase there is any function module to find out the same or any other way to get the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:15:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662870#M293661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662871#M293662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GO to SM12 and click the list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you 'll have the list of users accesing the  same program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk tis fm's&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  call function 'ENQUEUE_READ'
               exporting gclient = gclient
                         guname  = guname
                         gname   = gname
                         garg    = garg
               importing subrc   = subrc
               tables    enq     = enq
               exceptions others = 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'ENQUE_READ'
             exporting gclient = gclient
                       guname  = guname
                       gname   = gname
                       garg    = garg
             importing subrc   = subrc
             tables    enq     = enq.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back for more help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:22:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662871#M293662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662872#M293663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Naresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find out programmatically.&lt;/P&gt;&lt;P&gt;i.e when I am executing a program and if the same is being executed by another person, then the program should give a popup message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662872#M293663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662873#M293664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, if this is a custom program, you can lock it up during execution by using the lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


  data: repid type sy-repid.
  
   repid = sy-repid
  
  call function 'ENQUEUE_E_TRDIR'
   EXPORTING
     MODE_TRDIR           = 'X'
     NAME                 = repid
*     X_NAME               = ' '
*     _SCOPE               = '2'
*     _WAIT                = ' '
*     _COLLECT             = ' '
   EXCEPTIONS
     FOREIGN_LOCK         = 1
     SYSTEM_FAILURE       = 2
     OTHERS               = 3
            .
  if sy-subrc &amp;lt;&amp;gt; 0.
    message w001(00) with 'Program in use by another user'.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662873#M293664</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-08T20:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662874#M293665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The proposed solution will only tell me that the program is being executed by another user.&lt;/P&gt;&lt;P&gt;Is it possible to find out who the other user id is ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:29:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662874#M293665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662875#M293666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;Would the FMs suggested by you return the user id of the person who is currently executing the same program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:32:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662875#M293666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662876#M293667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception 1  foreign lock&lt;/P&gt;&lt;P&gt;          captures the user .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'ENQUEUE_E_TRDIR'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     MODE_TRDIR           = 'X'&lt;/P&gt;&lt;P&gt;     NAME                 = repid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_NAME               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _SCOPE               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _WAIT                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    _COLLECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    select single * from trdir where name = repid.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will gve you the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back for more help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662876#M293667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662877#M293668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry try this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data: repid type sy-repid.
repid = sy-repid.

parameters: p_check.

at selection-screen.

call function 'ENQUEUE_E_TRDIR'
     exporting
          mode_trdir     = 'X'
          name           = repid
     exceptions
          foreign_lock   = 1
          system_failure = 2
          others         = 3.
&amp;lt;b&amp;gt;if sy-subrc = 1.&amp;lt;/b&amp;gt;
&amp;lt;b&amp;gt; MESSAGE ID SY-MSGID TYPE 'W' NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&amp;lt;/b&amp;gt;
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When user hits enter on selection screen, warning message will appear with the locking user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662877#M293668</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-08T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Program being processed by another user</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662878#M293669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Naresh.&lt;/P&gt;&lt;P&gt;I shall try this out tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 20:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-being-processed-by-another-user/m-p/1662878#M293669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T20:39:44Z</dc:date>
    </item>
  </channel>
</rss>

