<?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: Prevent Commit from deleting DB-locks in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632833#M1942472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have given an answer which possibly fits the question, I can't image all scenarios that could be behind the question! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I don't know whether the program is custom or standard. I don't know whether the COMMIT is done by the standard or not. I don't know whether the OP wants to run update function modules with the commit, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Apr 2016 15:50:27 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2016-04-27T15:50:27Z</dc:date>
    <item>
      <title>Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632830#M1942469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a possibility to prevent a Commit Statement from deleting DB-locks?&lt;/P&gt;&lt;P&gt;I'm working on a program that commits an DB-Update during execution but I don't want it to remove a DB-lock (Set by Call Function 'Enqueue_E_DBTable), as the DB-lock controls the execution of an Do-Loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 08:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632830#M1942469</guid>
      <dc:creator>philippdoelker</dc:creator>
      <dc:date>2016-04-27T08:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632831#M1942470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enqueue function modules set an ABAP lock (lock in ABAP system only, SM12), not a DB lock (lock by the database system).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may retain the ABAP locks by committing at database level using CALL FUNCTION 'DB_COMMIT'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 15:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632831#M1942470</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-04-27T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632832#M1942471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But then what happens when SAP does either an implied commit,&amp;nbsp; or a 'COMMIT WORK', or even &lt;SPAN __jive_emoticon_name="alert" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/alert.gif"&gt;&lt;/SPAN&gt; a 'ROLLBACK WORK' ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 15:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632832#M1942471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-04-27T15:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632833#M1942472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have given an answer which possibly fits the question, I can't image all scenarios that could be behind the question! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I don't know whether the program is custom or standard. I don't know whether the COMMIT is done by the standard or not. I don't know whether the OP wants to run update function modules with the commit, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 15:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632833#M1942472</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-04-27T15:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632834#M1942473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pleas give more details.&lt;/P&gt;&lt;P&gt;As Sandra said: &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Enqueue locks are so-called cooperative locks. That means there is no real lock at database level (as i.a. with SELECT SINGLE ... FOR UPDATE). But other programs should try to set the same lock before updating the database.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;The 'Master' of the process, i.e. the top-most level in the call hierarchy is allowed to issue a COMMIT WORK (preferedly use function BAPI_TRANSACTION_COMMIT).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Implicit commits are done at any program interruption as screen displays, RFC calls and such. They don not affect any locks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;The COMMIT WORK (as issued by &lt;SPAN style="color: #333333; font-size: 12px;"&gt;function BAPI_TRANSACTION_COMMIT) will trigger execution of all function modules called IN UPDATE TASK and PERFORM ON COMMITs.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Regards Clemens&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 16:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632834#M1942473</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2016-04-27T16:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632835#M1942474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you can use a secondary database connection in some way? But as Clemens says - we need a bit more detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 05:43:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632835#M1942474</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-04-28T05:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Prevent Commit from deleting DB-locks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632836#M1942475</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;first of all I have to correct myself, as Sandra mentioned I used an ABAP lock, not a DB-lock.&lt;BR /&gt;Although the Issue is already solved I'll try to give you some more detail:&lt;BR /&gt;The Report is a Custom Report, created to monitor a Business Process. The monitoring is implemented by a demon running (in an endless do-loop). The Demon controls itself at the end of the loop by testing if the lock can be set or not (lock can be set means lock was deleted by someone -&amp;gt; Demon should stop). This control mechanism is implemented from outside with a control transaction that creates a DB-Entry (on which afterwards the Demon sets the lock). In the control transaction you can also delete the DB-Entry, so the ABAP-lock is also deleted and the Demon stops running. Hope this is comprehensible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem was that the lock disappeared after a Commit Statement in the report and thereby the Demon stopped. Solved this issue by manipulating the _scope parameter of the FM 'Enqueue..'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for your replies!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 07:03:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prevent-commit-from-deleting-db-locks/m-p/11632836#M1942475</guid>
      <dc:creator>philippdoelker</dc:creator>
      <dc:date>2016-04-28T07:03:51Z</dc:date>
    </item>
  </channel>
</rss>

