<?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: Locking transaction from modifying table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815759#M1314063</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 locks releases are dependent on the scope parmeter which you are passing ot the ENQUEUE_FUNCTION module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are this parameter can have 3 values 1,2,3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to pass correct value depending on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are updating all the tables in the same program which you are using to displaying the transaction go for scope parameter 1. So the lock will get released automatically when you end the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use some function module at update task then use the scope parameter 2. In such case you need to end it after updation using DEQUQE_&amp;lt;lock object&amp;gt; FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Generally locks will get released once the transaction got ended by /n. You can check that in T code SM12. after coming out of transaction. No need of Dequeue FM in such case.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kiran Pasala on Jun 26, 2009 3:36 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kiran Pasala on Jun 26, 2009 3:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2009 13:35:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-26T13:35:55Z</dc:date>
    <item>
      <title>Locking transaction from modifying table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815757#M1314061</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;We have a transaction. This transaction is used to modify the data in certain tables. Currently multiple users can open the transaction in 'Change Mode'. We have to put a lock if one 'Change Mode' is open for transaction, it should say other new users that they can't modify it and open in display mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We thought of following strategy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create lock object for each corresponding to each table.&lt;/P&gt;&lt;P&gt;2. Call Enqueue Function Modules in PBO of different screens used in transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now problem is that once user is leaving the transaction he/she should dequeue it. We can do it by calling Dequeue FMs corresponding to 'BACK/EXIT/CANCEL' buttons. &lt;STRONG&gt;But can't think how to handle the scenario if user presses '/n'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also suggest any other way of handling the issue as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashwini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 12:46:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815757#M1314061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T12:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Locking transaction from modifying table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815758#M1314062</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;If the user exits by choosing /n the locks are released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check this yourself, go into any transaction that opens a lock, then view the lock in SM12.  Now, close the first transaction with /n and refresh the list in SM12.  The locks have gone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 13:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815758#M1314062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T13:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Locking transaction from modifying table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815759#M1314063</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 locks releases are dependent on the scope parmeter which you are passing ot the ENQUEUE_FUNCTION module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are this parameter can have 3 values 1,2,3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to pass correct value depending on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are updating all the tables in the same program which you are using to displaying the transaction go for scope parameter 1. So the lock will get released automatically when you end the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use some function module at update task then use the scope parameter 2. In such case you need to end it after updation using DEQUQE_&amp;lt;lock object&amp;gt; FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Generally locks will get released once the transaction got ended by /n. You can check that in T code SM12. after coming out of transaction. No need of Dequeue FM in such case.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kiran Pasala on Jun 26, 2009 3:36 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kiran Pasala on Jun 26, 2009 3:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 13:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-transaction-from-modifying-table/m-p/5815759#M1314063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T13:35:55Z</dc:date>
    </item>
  </channel>
</rss>

