<?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 Check locked table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354748#M1399421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a Z-program I'm calling at the begining to the FM ENQUEUE_E_TABLEE. At the end I'm calling DEQUEUE_E_TABLEE.&lt;/P&gt;&lt;P&gt;All this had been implemented in order to prevent from another user that enter the program dealing with a spesific Z-table.&lt;/P&gt;&lt;P&gt;How can I check if the table is locked now or not ? &lt;/P&gt;&lt;P&gt;I would like to check at the first command of the program if another user is executing the program or not (and I want to do it by checking if somewhere else the Z-table had been locked..).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rebeka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Nov 2009 10:06:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-17T10:06:27Z</dc:date>
    <item>
      <title>Check locked table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354748#M1399421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a Z-program I'm calling at the begining to the FM ENQUEUE_E_TABLEE. At the end I'm calling DEQUEUE_E_TABLEE.&lt;/P&gt;&lt;P&gt;All this had been implemented in order to prevent from another user that enter the program dealing with a spesific Z-table.&lt;/P&gt;&lt;P&gt;How can I check if the table is locked now or not ? &lt;/P&gt;&lt;P&gt;I would like to check at the first command of the program if another user is executing the program or not (and I want to do it by checking if somewhere else the Z-table had been locked..).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rebeka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 10:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354748#M1399421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-17T10:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Check locked table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354749#M1399422</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;If you want to check at the first command of the program if another user is executing use the FM: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; AUTHORITY-CHECK OBJECT  'ZABAP' ID 'EXGRP'  FIELD 'T1' .


CALL FUNCTION 'AUTHORITY_CHECK'
  EXPORTING
   USER                      = SY-UNAME
    object                    = 'ZABAP'
    field1                    = 'EXGRP'
   VALUE1                    = 'T1'

 EXCEPTIONS
   USER_DONT_EXIST           = 1
   USER_IS_AUTHORIZED        = 2
   USER_NOT_AUTHORIZED       = 3
   USER_IS_LOCKED            = 4
   OTHERS                    = 5
          .
IF sy-subrc  =  3.
 raise exception.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will serve your purpose...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anil Kumar Reddy on Nov 17, 2009 11:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 10:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354749#M1399422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-17T10:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Check locked table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354750#M1399423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try function module &lt;STRONG&gt;ENQUEUE_READ&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 10:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354750#M1399423</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-11-17T10:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Check locked table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354751#M1399424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can check this with the function ENQUEUE_READ: parameter GNAME = Z table name&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;Lieselot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 10:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-locked-table/m-p/6354751#M1399424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-17T10:32:55Z</dc:date>
    </item>
  </channel>
</rss>

