<?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: Lock record - Unlock record in Dialog Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540603#M1657300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas .. When you question it .. I always feel that there would be something in it. &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; .Frankly speaking.. I did not notice that it was shared lock used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He should use the mode as (E)xclusive so that further locks for the same object are rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thumbs up. Hope OP is listening what is being commented here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2012 11:40:41 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2012-01-27T11:40:41Z</dc:date>
    <item>
      <title>Lock record - Unlock record in Dialog Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540599#M1657296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Guys ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have made a custom screen that has 2 buttons that shows the previous and the next record.&lt;/P&gt;&lt;P&gt;IMy scanario is the following :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two users logon to the screen and hit the previous button that shows that previous record.&lt;/P&gt;&lt;P&gt;The first locks the record with the Enque_...... .&lt;/P&gt;&lt;P&gt;How can i show the record to the second user without the message "the record is locked .....".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ENQUEUE_EYPROJECTS'
 EXPORTING
   MODE_YPROJECTS       = 'S'
   MANDT                = SY-MANDT
   BUKRS                = yprojects-bukrs
   PROJECT              = yprojects-project
*   X_BUKRS              = ' '
*   X_PROJECT            = ' '
*   _SCOPE               = '2'
*   _WAIT                = ' '
*   _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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 10:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540599#M1657296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-27T10:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lock record - Unlock record in Dialog Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540600#M1657297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When first record is seen it is locked and when 2nd user will try to lock it this lock will fail and he will see error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 10:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540600#M1657297</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2012-01-27T10:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Lock record - Unlock record in Dialog Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540601#M1657298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The idea is to check if the lock already exists using ENQUEUE_READ( referring the field GTARG ) instead of trying it to lock again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 10:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540601#M1657298</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-01-27T10:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Lock record - Unlock record in Dialog Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540602#M1657299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea is to check if the lock already exists using ENQUEUE_READ( referring the field GTARG ) instead of trying it to lock again&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think this is completely correct! All ENQUEUE modules have an exception &lt;EM&gt;FOREIGN_LOCK&lt;/EM&gt; which is raised when lock requests are rejected.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EXPORTING
   MODE_YPROJECTS       = 'S' "--&amp;gt; (S)hared&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;OP has used the lock mode as 'S' hence requests for subsequent locks are processed successfully -&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Requests for further shared locks are accepted, even if they are issued by different users&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;EM&gt;source: SAP F1 help&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He should use the mode as (E)xclusive so that further locks for the same object are rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know your thoughts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 11:13:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540602#M1657299</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-01-27T11:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lock record - Unlock record in Dialog Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540603#M1657300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas .. When you question it .. I always feel that there would be something in it. &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; .Frankly speaking.. I did not notice that it was shared lock used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He should use the mode as (E)xclusive so that further locks for the same object are rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thumbs up. Hope OP is listening what is being commented here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 11:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-record-unlock-record-in-dialog-program/m-p/8540603#M1657300</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-01-27T11:40:41Z</dc:date>
    </item>
  </channel>
</rss>

