<?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: Regarding Lock Object. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951710#M944664</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;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;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2008 06:31:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-04T06:31:27Z</dc:date>
    <item>
      <title>Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951708#M944662</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 want that nobody could see my table, so in DDIC i created a lock object (Exclusive, Cumulative) for that table. now how will i use this lock object further ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 06:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951708#M944662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T06:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951709#M944663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When the lock object is activated, the following function modules are generated from its definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE  (set locks) &lt;/P&gt;&lt;P&gt;DENQUEUE  (release locks)&lt;/P&gt;&lt;P&gt;These function modules can now be linked to ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set locks can be removed by calling the function module DEQUEUE as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward If Helpfull, &lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 06:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951709#M944663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T06:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951710#M944664</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;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;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 06:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951710#M944664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T06:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951711#M944665</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;Lock Mechanisms in the Database System&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database system automatically sets database locks when it receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program. Database locks are physical locks on the database entries affected by these statements. You can only set a lock for an existing database entry, since the lock mechanism uses a lock flag in the entry. These flags are automatically deleted in each database commit. This means that database locks can never be set for longer than a single database LUW; in other words, a single dialog step in an R/3 application program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Locks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the R/3 System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary. A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_&amp;lt;lock object name&amp;gt; and DEQUEUE_&amp;lt;lock object name&amp;gt; . You can then set and release SAP locks in your ABAP program by calling these function modules in a CALL FUNCTION statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information.&lt;/P&gt;&lt;P&gt;check this link-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 06:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951711#M944665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T06:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951712#M944666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;    what parameters should be passed to function module ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 06:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951712#M944666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T06:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951713#M944667</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; Enque and Deque are two function modules which get created when a lock object is geenrated. Enque FM is used to create the lock and deque FM is used to release the lock. The parameters for Deque correspond to the Enque parameters. here are the important params for the two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1: MODE_dbtab: Type of lock, S for shared, E for exclusive, X for expanded exclusive which can be requested once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2: key_fields: you can define the exact row to be locked by defining the key fields of that row which make it unique. Or you can leave this blank if you want to lock all rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3: _SCOPE: Lock duration with respect to the LUW. Possible entries, 1 for handling lock in the same program. 2 for transferring lock to the update and 3 for handling lock in the program and the update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if Helpfull,&lt;/P&gt;&lt;P&gt; Naresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 07:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951713#M944667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T07:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951714#M944668</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 we can check that weather it's working or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 07:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951714#M944668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T07:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951715#M944669</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;In the menu ..GOTO -&amp;gt; LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must call the function modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE_&amp;lt;lock object&amp;gt;&lt;/P&gt;&lt;P&gt;DEQUEUE_&amp;lt;lock object&amp;gt; and call them in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the example in tcode ..ABAPDOCU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abap database access&lt;DEL&gt;-&amp;gt;sap transactionconcept&lt;/DEL&gt;--&amp;gt;setting and releasing locks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;preet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 09:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951715#M944669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Lock Object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951716#M944670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When the lock object is activated, the following function modules are generated from its definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENQUEUE (set locks) &lt;/P&gt;&lt;P&gt;DENQUEUE (release locks)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now to check if its working or not,&lt;/P&gt;&lt;P&gt;an error message will come when some other user tries to read it,update it or change it wen u are working on it...saying that the object is locked.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;reward if Useful&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 09:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-lock-object/m-p/3951716#M944670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T09:26:48Z</dc:date>
    </item>
  </channel>
</rss>

