<?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 transaction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034446#M964242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. &lt;/P&gt;&lt;P&gt;When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_Name and DEQUEUE_Name. &lt;/P&gt;&lt;P&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 04:51:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T04:51:56Z</dc:date>
    <item>
      <title>lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034444#M964240</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; any one can give me name of the function module which&lt;/P&gt;&lt;P&gt;can lock a particular transaction .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its urgent , any useful answer is rewarded by points .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards ,&lt;/P&gt;&lt;P&gt;Nilesh  Jain .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:45:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034444#M964240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034445#M964241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create lock objects for your  purpuose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eef3446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eef3446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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="752748"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/a2/3547360f2ea61fe10000009b38f839/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/a2/3547360f2ea61fe10000009b38f839/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034445#M964241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034446#M964242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. &lt;/P&gt;&lt;P&gt;When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_Name and DEQUEUE_Name. &lt;/P&gt;&lt;P&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034446#M964242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034447#M964243</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;see below link it may give idea.&lt;/P&gt;&lt;P&gt;&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="751007"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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="419177"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishvesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful, rewards it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:52:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034447#M964243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034448#M964244</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 use enqueue and dequeue Fms. the topic has already been disucssed here.&lt;/P&gt;&lt;P&gt;chk this: &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="419177"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:52:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034448#M964244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034449#M964245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear friend ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this way u can do it easily.&lt;/P&gt;&lt;P&gt;rewards are expected.&lt;/P&gt;&lt;P&gt;vivek.&lt;/P&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;&lt;P&gt;Function Modules &lt;/P&gt;&lt;P&gt;Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;FUNCTION func. &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*" Local Interface: &lt;/P&gt;&lt;P&gt;*" parameter_interface &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDFUNCTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Between the statements FUNCTION and ENDFUNCTION, the functions of a function module func are implemented in a function group. The function module and its interface are defined in the Function Builder tool. In the source code of the function module, the function module interface defined in the Function Builder is automatically displayed as parameter_interface in comment lines underneath the FUNCTION statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the function module, local data types and data objects can be declared. There is also access to the formal parameters of the function module and to the global data types and data objects of the function group. A function module is called using the statement CALL FUNCTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;The logical expression IS SUPPLIED can be used in the function module to determine whether an actual parameter has been specified for a formal parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Implementation of a function module that reads data in a table-type formal parameter flight_tab under the condition of an elementary formal parameter id. The parameter interface defined in the Function Builder is visible as a comment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION read_spfli_into_table. &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*" Local Interface: &lt;/P&gt;&lt;P&gt;*"       IMPORTING &lt;/P&gt;&lt;P&gt;*"             VALUE(ID) LIKE  SPFLI-CARRID DEFAULT 'LH ' &lt;/P&gt;&lt;P&gt;*"       EXPORTING &lt;/P&gt;&lt;P&gt;*"             FLIGHT_TAB TYPE  SPFLI_TAB &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SELECT * &lt;/P&gt;&lt;P&gt;         FROM spfli &lt;/P&gt;&lt;P&gt;         INTO TABLE flight_tab &lt;/P&gt;&lt;P&gt;         WHERE carrid = id. &lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 04:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034449#M964245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T04:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: lock transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034450#M964246</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;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;&lt;STRONG&gt;Exclusive lock&lt;/STRONG&gt;: 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;&lt;STRONG&gt;Shared lock&lt;/STRONG&gt;: 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;&lt;STRONG&gt;Exclusive but not cumulative&lt;/STRONG&gt;: 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;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Creating Lock Objects :  SE11&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select object type &lt;STRONG&gt;Lock&lt;/STRONG&gt; object in the initial screen of the &lt;STRONG&gt;ABAP Dictionary&lt;/STRONG&gt;, enter an object name and choose Create. The name of a lock object should begin with an E (Enqueue). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you activate the lock object, the two function modules &lt;STRONG&gt;ENQUEUE_&amp;lt;lockobjectname&amp;gt;&lt;/STRONG&gt; and &lt;STRONG&gt;DEQUEUE_&amp;lt;lockobjectname&amp;gt;&lt;/STRONG&gt; are generated from its definition to set and release locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When booking flights it is important to prevent flights from being overbooked. For this reason, you have to lock the particular flight as well as all the bookings existing for this flight during processing. You can do this with lock object E_BOOKING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lock argument of table SFLIGHT thus contains the fields MANDT, CARRID, CONNID, and FLDATE. The lock argument of table SBOOK thus contains the fields MANDT, CARRID, CONNID, FLDATE, BOOKID and CUSTOMID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select exclusive lock mode, that is the locked data can only be displayed and edited by one user.&lt;/P&gt;&lt;P&gt;&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;ENQUEUE_ E_BOOKING (set locks) &lt;/P&gt;&lt;P&gt;ENQUEUE_ E_BOOKING (release locks)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example shows how function module ENQUEUE_ E_BOOKING is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION  u2018 ENQUEUE_E_BOOKINGu2019
Exporting
    mode_sflight   = u2018Eu2019
    mode_sbook  =  u2018Eu2019
    mandt  =  sy-mandt
    carrid  =   u2018LHu2019
    connid  =  400
    fldate  = u201819981129u2019
    bookid  = 0
    customid   = 0
    x_carrid  = u2018  u2018
    x_connid  = u2018  u2018 
    x_fldate  =  u2018  u2018
    x-bookid  = u2018  u2018 
    x_customid  = u2018  u2018
    _scope  = u20182u2019
    _wait  = u2018Xu2019
    _collect  =  u2018  u2018
Exceptions
    foreign_lock  = 1
    system_failure  = 2
    others  = 3.


CALL FUNCTION  u2018 DEQUEUE_E_BOOKINGu2019
Exporting
    mode_sflight   = u2018Eu2019
    mode_sbook  =  u2018Eu2019
    mandt  =  sy-mandt
    carrid  =   u2018LHu2019
    connid  =  400
    fldate  = u201819981129u2019
    bookid  = 0
    customid   = 0
    x_carrid  = u2018  u2018
    x_connid  = u2018  u2018 
    x_fldate  =  u2018  u2018
    x-bookid  = u2018  u2018 
    x_customid  = u2018  u2018
    _scope  = u20183u2019
    _synchron  =  u2018  u2018
    _collect  =  u2018  u2018&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Deletion of Locks :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the initial screen of the ABAP Dictionary, select object type Lock object and enter the lock object name. &lt;/P&gt;&lt;P&gt;Choose  to find all the programs or classes that are still using the lock object. Remove the lock module calls in the objects you found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose . &lt;/P&gt;&lt;P&gt;A dialog box appears in which you must confirm the deletion request. If the function modules belonging to the lock object are still in use in programs or classes, a corresponding warning appears. In this case you must adjust the programs or classes affected before deleting the lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will clarify your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz reward if useful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dhanashri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 05:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-transaction/m-p/4034450#M964246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T05:23:36Z</dc:date>
    </item>
  </channel>
</rss>

