<?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: Query on sap locks(ENQUEUE/DEQUEUE) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652144#M879664</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Prasad,

ENQUEUE_&lt;STRONG&gt;/ DEQUEUE_&lt;/STRONG&gt; function modules should be called when u r updating/ inserting records to the tables which are normally updated or inserted using Transaction screens. 

for other tables not necessary.

for example if u take VBAK or VBAP, these are generally updated using transactions. when u want to update them programmatically locks needs to be applied.

I hope that it helps u .

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Apr 2008 14:49:45 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-04-20T14:49:45Z</dc:date>
    <item>
      <title>Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652143#M879663</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;should the sap locks ENQUEUE/DEQUEUE need to be used  for all the updation/insertion  of records ino the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please confirm.Should this locking technique be used even for insertion of records into the table?&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;Pra.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Apr 2008 11:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652143#M879663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-20T11:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652144#M879664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Prasad,

ENQUEUE_&lt;STRONG&gt;/ DEQUEUE_&lt;/STRONG&gt; function modules should be called when u r updating/ inserting records to the tables which are normally updated or inserted using Transaction screens. 

for other tables not necessary.

for example if u take VBAK or VBAP, these are generally updated using transactions. when u want to update them programmatically locks needs to be applied.

I hope that it helps u .

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Apr 2008 14:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652144#M879664</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-20T14:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652145#M879665</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;Insertion or creation of records does not require locking mechanism. &lt;/P&gt;&lt;P&gt;U can refer to the below link for further info on Locking mechanism : &lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mrunal&lt;/P&gt;&lt;P&gt;Intelligrp Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 06:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652145#M879665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T06:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652146#M879666</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;Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Provide three type of Lock objects.  &lt;/P&gt;&lt;P&gt;- Read Lock(Shared Locked) &lt;/P&gt;&lt;P&gt;   protects read access to an object. The read lock allows other  transactions read access but not write access to  &lt;/P&gt;&lt;P&gt;   the locked area of  the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Write Lock(exclusive lock) &lt;/P&gt;&lt;P&gt;   protects write access to an object. The write lock allows other  transactions neither read nor write access to  &lt;/P&gt;&lt;P&gt;    the locked area of the  table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Enhanced write lock (exclusive lock without cumulating) &lt;/P&gt;&lt;P&gt;  works like a write lock except that the enhanced write lock also  protects from further accesses from the  &lt;/P&gt;&lt;P&gt;  same transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technicaly: &lt;/P&gt;&lt;P&gt;When you create a lock object System automatically creat two function module. &lt;/P&gt;&lt;P&gt;1. ENQUEUE_&amp;lt;Lockobject name&amp;gt;. to insert the object in a queue. &lt;/P&gt;&lt;P&gt;2. DEQUEUE_&amp;lt;Lockobject name&amp;gt;. To remove the object is being queued through above FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use these function module in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will give a basic idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652146#M879666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652147#M879667</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;Thanks for your replies.&lt;/P&gt;&lt;P&gt;But i am getting controvercy answers for the question Whether to have a lock for the insertion of the records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me the reasons of why if we need it and why not if we do not want a lock for insertion of records.&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;Pra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 06:33:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652147#M879667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T06:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query on sap locks(ENQUEUE/DEQUEUE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652148#M879668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The use of lock objects is to lock the table while updating or inserting the records in a table.but when to use locking depends on the requirement.generally we will not use locking mechanism in our programs.if we want to use  we have to call &lt;/P&gt;&lt;P&gt;ENQUE_LOCKOBJECT functional module first and then perform operations on the table and then call DEQUE_LOCKOBJECT functional module.when you call ENQUE fm the table is locked and nobody is able to change the content of the table but  depending on the lock type they can read only.so if we have a program to insert records into a table.we checked the table primary key values.we inserted other than that values.but when you executing the program other person manually using sm30 or se11 entered the record that you want to uppdate.means the field is of int and have values 1,2,3,4.tyou want to insert from 5.but manually it is inserted.so u r program will go wrong means it will not inset that record.to avoid this type of things we will use locking.but generally at client side nobody will execute the transaction or program same time.so there is no problem if you will not locking also.but whether to use locking or not depends on the situation only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards points if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 10:06:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-sap-locks-enqueue-dequeue/m-p/3652148#M879668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T10:06:45Z</dc:date>
    </item>
  </channel>
</rss>

