<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726664#M316708</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;   lockobject is created using se11 &lt;/P&gt;&lt;P&gt;   by default enqueue_&amp;lt;lock objectname&amp;gt;      &lt;/P&gt;&lt;P&gt;              dequeue_&amp;lt;lock objectname&amp;gt; are created &lt;/P&gt;&lt;P&gt;   by SAP.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   you can create at table level or row level lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'ENQUEUE_EZPPX0010A'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            MODE_ZPPDORD   = 'E'&lt;/P&gt;&lt;P&gt;            MANDT          = SY-MANDT&lt;/P&gt;&lt;P&gt;            WERKS          = S_WERKS&lt;/P&gt;&lt;P&gt;            AUFNR          = X_LOCK_LEVEL&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;delete lock after each insertion&lt;/P&gt;&lt;P&gt;or use call function 'DEQUEUE_ALL'           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_EZPPX0010A' &lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            MODE_ZPPDORD   = 'E'&lt;/P&gt;&lt;P&gt;            MANDT          = SY-MANDT&lt;/P&gt;&lt;P&gt;            WERKS          = S_WERKS&lt;/P&gt;&lt;P&gt;            AUFNR          = X_LOCK_LEVEL&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;Regards,&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Nov 2006 09:24:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-03T09:24:24Z</dc:date>
    <item>
      <title>locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726661#M316705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi to all,&lt;/P&gt;&lt;P&gt;help me in this issue&lt;/P&gt;&lt;P&gt;when a user is executing a program it should through a error messege to other user who entered the same transaction it must through an error that it is locked.&lt;/P&gt;&lt;P&gt;simoultanously no two users should run the transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;kiran kumar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: kiran kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 23:09:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726661#M316705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-02T23:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726662#M316706</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;U can create a ZTABLE where you store the program or transaction name and then create a lock object for that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way in the event INITIALIZATION you raise that lock and if SY-SUBRC &amp;lt;&amp;gt; 0 you raise an error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INITIALIZATION.

  CALL FUNCTION 'ENQUEUE_EZFAGTO01'
    EXPORTING
      MODE_ZFAGTO01  = 'E'
      MANDT          = SY-MANDT
      PROGRAMM       = SY-REPID
    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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 23:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726662#M316706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-02T23:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726663#M316707</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;Create a table with only one column say LOCKED ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the column value and check if is ' '..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so run the program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not raise an error message..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the value is ' '..Then immediately set the value to 'X' and do COMMIT WORK..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the program is executed..Then modify the value as ' ' and update the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 23:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726663#M316707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-02T23:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726664#M316708</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;   lockobject is created using se11 &lt;/P&gt;&lt;P&gt;   by default enqueue_&amp;lt;lock objectname&amp;gt;      &lt;/P&gt;&lt;P&gt;              dequeue_&amp;lt;lock objectname&amp;gt; are created &lt;/P&gt;&lt;P&gt;   by SAP.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   you can create at table level or row level lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'ENQUEUE_EZPPX0010A'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            MODE_ZPPDORD   = 'E'&lt;/P&gt;&lt;P&gt;            MANDT          = SY-MANDT&lt;/P&gt;&lt;P&gt;            WERKS          = S_WERKS&lt;/P&gt;&lt;P&gt;            AUFNR          = X_LOCK_LEVEL&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;delete lock after each insertion&lt;/P&gt;&lt;P&gt;or use call function 'DEQUEUE_ALL'           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_EZPPX0010A' &lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            MODE_ZPPDORD   = 'E'&lt;/P&gt;&lt;P&gt;            MANDT          = SY-MANDT&lt;/P&gt;&lt;P&gt;            WERKS          = S_WERKS&lt;/P&gt;&lt;P&gt;            AUFNR          = X_LOCK_LEVEL&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;Regards,&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 09:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking/m-p/1726664#M316708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-03T09:24:24Z</dc:date>
    </item>
  </channel>
</rss>

