<?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: re: lock objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144044#M115585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     just look at my requirement. I created dynpro screens.In the first screen i have to enter the employee no and after choosing edit button i have to go to one more screen. If any body enters the same screen with the same employee number it has to restrict automatically.&lt;/P&gt;&lt;P&gt;so i have used lock object for this employee no. But i want to allow the users in read mode. for this i used&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;   call function 'ENQUEUE_EZ_ENO'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;P&gt;   mode_zemptr          = 'S'&lt;/P&gt;&lt;P&gt;   eno                  = eno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i open this transaction in one more session, it allowing the users to edit. what is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second one is what is the use of scope parameter. can anybody explain in real time scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2006 06:50:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-09T06:50:35Z</dc:date>
    <item>
      <title>re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144037#M115578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Iam implementing some screens. I created some lock objects. I could not able to  under these concepts. Even though I studied some documents, i could not get the below concepts. can anybody explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. what is the enqueue mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. what is the scope&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.what is the wait parametrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:13:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144037#M115578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144038#M115579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scope- Indicates who owns the lock&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144038#M115579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144039#M115580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this thread...&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="74086"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144039#M115580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144040#M115581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;for wait parameter&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wAIT UP TO time SECONDS &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The program execution is interrupted for time seconds. After this period, the program processing resumes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WAIT UNTIL logexp. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... UP TO time SECONDS. &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Before executing the WAIT statement, the condition in the logical expression logexp is evaluated. If this is satisfied, the execution of the program continues after WAIT. Otherwise, the results of the previously called asynchronous Remote Function Call are accepted until one of the FORM routines (RECEIVE RESULTS FROM FUNCTION func) that performs the task in question satisfies this condition or until there are no more asynchronous calls. In both cases, the program processing continues after WAIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;for Enqueue&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;is used to lock the objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;for scope&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;scope of variable will give whether the variable is local or global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:25:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144040#M115581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144041#M115582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi paluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Info taken from standard sap help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Enqueu Mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access by more than one user can be synchronized in the following ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected. &lt;/P&gt;&lt;P&gt;Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected. &lt;/P&gt;&lt;P&gt;Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Scope&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter _SCOPE controls how the lock or lock release is passed to the update program (see The Owner Concept for Locks). You have the following options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_SCOPE = 1: Locks and lock releases are not passed to the update program. The lock is removed when the transaction is ended. &lt;/P&gt;&lt;P&gt;_SCOPE = 2: The lock or lock release is passed to the update program. The update program is responsible for removing the lock. The interactive program with which the lock was requested no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module. &lt;/P&gt;&lt;P&gt;_SCOPE = 3: The lock or lock release is also passed to the update program. The lock must be removed in both the interactive program and in the update program. This is the standard setting for the DEQUEUE function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. WAIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ENQUEUE function module also has the parameter _WAIT. This parameter determines the lock behavior when there is a lock conflict.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have the following options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initial value: If a lock attempt fails because there is a competing lock, the exception FOREIGN_LOCK is triggered. &lt;/P&gt;&lt;P&gt;X : If a lock attempt fails because there is a competing lock, the lock attempt is repeated after waiting for a certain time. The exception FOREIGN_LOCK is triggered only if a certain time limit has elapsed since the first lock attempt. The waiting time and the time limit are defined by profile parameters.&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144041#M115582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144042#M115583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi won,&lt;/P&gt;&lt;P&gt;        u given answer that scope is for own lock. What does it mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144042#M115583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144043#M115584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SCOPE parameter indicates the owner of the lock&lt;/P&gt;&lt;P&gt;Check &lt;A href="http://help.sap.com/saphelp_bw30b/helpdata/en/55/6981c4d46011d194bb00a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_bw30b/helpdata/en/55/6981c4d46011d194bb00a0c94260a5/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 10:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144043#M115584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T10:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144044#M115585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     just look at my requirement. I created dynpro screens.In the first screen i have to enter the employee no and after choosing edit button i have to go to one more screen. If any body enters the same screen with the same employee number it has to restrict automatically.&lt;/P&gt;&lt;P&gt;so i have used lock object for this employee no. But i want to allow the users in read mode. for this i used&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;   call function 'ENQUEUE_EZ_ENO'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;P&gt;   mode_zemptr          = 'S'&lt;/P&gt;&lt;P&gt;   eno                  = eno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i open this transaction in one more session, it allowing the users to edit. what is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second one is what is the use of scope parameter. can anybody explain in real time scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 06:50:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144044#M115585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T06:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144045#M115586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi paluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used this and it works fantastic&lt;/P&gt;&lt;P&gt;in multi-user, multi-session environment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For your requirement of Employee,&lt;/P&gt;&lt;P&gt;   use the FM.&lt;/P&gt;&lt;P&gt;  HR_EMPLOYEE_ENQUEUE&lt;/P&gt;&lt;P&gt;  HR_EMPLOYEE_DEQUEUE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;P&gt;DATA : ret LIKE bapireturn1.&lt;/P&gt;&lt;P&gt;  DATA : locking_user LIKE sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt; For Enque&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF react = 'E'.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        number       = ptab-pernr&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return       = ret&lt;/P&gt;&lt;P&gt;        locking_user = locking_user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In case of VIEW,&lt;/P&gt;&lt;P&gt;   do not enque.&lt;/P&gt;&lt;P&gt;   In case of edit, Yes, enqueue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. This FM is standard SAP.&lt;/P&gt;&lt;P&gt;   Hence, it will take care of other sap &lt;/P&gt;&lt;P&gt;  trnascations like pa30 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Amit Mittal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 07:24:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144045#M115586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T07:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144046#M115587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi amit,&lt;/P&gt;&lt;P&gt;        Because of some reasons iam using other type of data elemtn to emp name. i want to know what is the exact use of enqueue mode shared type and scope in real time. what is the use of argumetn value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;p.kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 07:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144046#M115587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T07:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: re: lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144047#M115588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to se11 and select the lockobject radio button then create ur own lock object. if you need more info let me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 08:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-lock-objects/m-p/1144047#M115588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T08:02:30Z</dc:date>
    </item>
  </channel>
</rss>

