<?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: how to know whether the table has been locked using lock objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721574#M314892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;I know how to create and use the lock objects .&lt;/P&gt;&lt;P&gt;I want to find out is my table getting locked during runtime of my program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Oct 2006 13:12:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-30T13:12:33Z</dc:date>
    <item>
      <title>how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721570#M314888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;how to know whether the table has been locked or not when we are executing and modifying the DB table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the program and used the enqueue and dequeue fm for respective tables. But how do i know whether the table is locked at runtime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 12:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721570#M314888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T12:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721571#M314889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can see locks via transaction SM12&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 12:27:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721571#M314889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T12:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721572#M314890</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;&lt;/P&gt;&lt;P&gt;use fm ENQUEUE_E_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 13:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721572#M314890</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-10-30T13:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721573#M314891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tried the t.code and given the table name but it does not show any locked tables.&lt;/P&gt;&lt;P&gt;I want to know that the table is been locked while executing the program.&lt;/P&gt;&lt;P&gt; my code is in this manner. If found any thing wrong please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUEUE_E_EASTE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   MODE_EASTE           = 'E'&lt;/P&gt;&lt;P&gt;   MANDT                = SY-MANDT&lt;/P&gt;&lt;P&gt;   LOGIKZW              = p_logikz&lt;/P&gt;&lt;P&gt;   AB                   = p_ab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_LOGIKZW            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_AB                 = ' '&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;/UL&gt;&lt;P&gt;   _WAIT                = 'X'&lt;/P&gt;&lt;UL&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 &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MODIFY consuption value with new consumption&lt;/P&gt;&lt;P&gt; w_easte-perverbr = p_pervbr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY easte FROM w_easte .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE s968(/vfs/biljett) WITH 'EASTE' .&lt;/P&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;P&gt;    MESSAGE s969(/vfs/biljett) WITH 'EASTE'.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*UNLOCK the TABLE EASTE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE_E_EASTE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MODE_EASTE       = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   MANDT            = SY-MANDT&lt;/P&gt;&lt;P&gt;   LOGIKZW          = p_logikz&lt;/P&gt;&lt;P&gt;   AB               = p_ab&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  X_LOGIKZW        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  X_AB             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  _SCOPE           = '3'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;   _SYNCHRON        = 'X'&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  _COLLECT         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Commit Work&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  COMMIT WORK.&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;mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 13:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721573#M314891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T13:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721574#M314892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;I know how to create and use the lock objects .&lt;/P&gt;&lt;P&gt;I want to find out is my table getting locked during runtime of my program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 13:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721574#M314892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T13:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721575#M314893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, put a break point after the ENQUEUE function module and before the DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ENQUEUE_E_EASTE'
EXPORTING
MODE_EASTE = 'E'
MANDT = SY-MANDT
LOGIKZW = p_logikz
AB = p_ab
* X_LOGIKZW = ' '
* X_AB = ' '
* _SCOPE = '2'
_WAIT = 'X'
* _COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

&amp;lt;b&amp;gt;BREAK-POINT.&amp;lt;/b&amp;gt;


*MODIFY consuption value with new consumption
w_easte-perverbr = p_pervbr .

MODIFY easte FROM w_easte .

IF SY-SUBRC NE 0.
MESSAGE s968(/vfs/biljett) WITH 'EASTE' .
ELSE.
MESSAGE s969(/vfs/biljett) WITH 'EASTE'.
ENDIF.


*UNLOCK the TABLE EASTE.

CALL FUNCTION 'DEQUEUE_E_EASTE'
EXPORTING
* MODE_EASTE = 'E'
MANDT = SY-MANDT
LOGIKZW = p_logikz
AB = p_ab
** X_LOGIKZW = ' '
** X_AB = ' '
** _SCOPE = '3'
_SYNCHRON = 'X'
** _COLLECT = ' '
.
** Commit Work
COMMIT WORK&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when the program stops in debug mode, open another session and to to SM12,  Enter you user id in the field on the screen and hit enter, your lock should be there.&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>Mon, 30 Oct 2006 13:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721575#M314893</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-30T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to know whether the table has been locked using lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721576#M314894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ENQUEUE_READ would give the list of objects that are currently locked by a specific user.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 13:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-know-whether-the-table-has-been-locked-using-lock-objects/m-p/1721576#M314894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T13:17:49Z</dc:date>
    </item>
  </channel>
</rss>

