<?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: ON COMMIT ABAP CLASS METHOD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092155#M101073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be possible, but with a little bit different approach:&lt;/P&gt;&lt;P&gt;You can implement an event handler for the commit event. Then you have to register this method for the commit event. Have a look at program SAPMSSY0. In routines %_before_commit, %_commit and %_after_commit you will find some events, e.g.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Raise event 'Commit Requested' for Object Manager
  CALL METHOD cl_os_transaction_end_notifier=&amp;gt;raise_commit_requested.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;, for which you might like to register your method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Dec 2005 12:38:57 GMT</pubDate>
    <dc:creator>christian_wohlfahrt</dc:creator>
    <dc:date>2005-12-12T12:38:57Z</dc:date>
    <item>
      <title>ON COMMIT ABAP CLASS METHOD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092154#M101072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;Can i execute and abap oo method on commit work.&lt;/P&gt;&lt;P&gt;similiar to perform form on commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 11:51:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092154#M101072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-12T11:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: ON COMMIT ABAP CLASS METHOD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092155#M101073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be possible, but with a little bit different approach:&lt;/P&gt;&lt;P&gt;You can implement an event handler for the commit event. Then you have to register this method for the commit event. Have a look at program SAPMSSY0. In routines %_before_commit, %_commit and %_after_commit you will find some events, e.g.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Raise event 'Commit Requested' for Object Manager
  CALL METHOD cl_os_transaction_end_notifier=&amp;gt;raise_commit_requested.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;, for which you might like to register your method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2005 12:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092155#M101073</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-12-12T12:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: ON COMMIT ABAP CLASS METHOD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092156#M101074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This methods are now privates.&lt;/P&gt;&lt;P&gt;The only friend of cl_os_transaction_end_notifier is cl_os_transaction&lt;/P&gt;&lt;P&gt;which have the event : IF_OS_TRANSACTION~SAVE_REQUESTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here what I've done :&lt;/P&gt;&lt;P&gt;In the class constructor :&lt;/P&gt;&lt;P&gt;data O_mngr type ref to if_os_transaction_manager.&lt;/P&gt;&lt;P&gt;data o_trans type ref to if_os_transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;O_mngr = cl_os_system=&amp;gt;get_transaction_manager( ).&lt;/P&gt;&lt;P&gt;O_tran = O_mngr-&amp;gt;Get_current_transaction( ).&lt;/P&gt;&lt;P&gt;Set handler my-event for O_tran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it'll helps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092156#M101074</guid>
      <dc:creator>taryckbensaili</dc:creator>
      <dc:date>2016-06-17T10:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: ON COMMIT ABAP CLASS METHOD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092157#M101075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please also note that you could do a loopback with a perform on commit to the class (need to be adapted for instance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do so create a module pool with 2 forms :&lt;/P&gt;&lt;P&gt;form register.&lt;/P&gt;&lt;P&gt;perform loopback on commit level 2147483647.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form loopback.&lt;/P&gt;&lt;P&gt;ZCL_MY_CLASS=&amp;gt;MY_LOOPBACK_ENTRY( ).&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also note that IF_OS_TRANSACTION~SAVE_REQUESTED is raised on %_before_commit,&lt;/P&gt;&lt;P&gt;while PERFORM ON COMMIT is raised on %_commit, so a few later on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could be usefull when you need to register FM in update task at the very last moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usefull link on Commit sequence :&lt;A href="https://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm" title="https://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm"&gt;https://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And perform on commit : &lt;A href="https://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm" title="https://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm"&gt;https://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 11:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/on-commit-abap-class-method/m-p/1092157#M101075</guid>
      <dc:creator>taryckbensaili</dc:creator>
      <dc:date>2016-06-17T11:09:21Z</dc:date>
    </item>
  </channel>
</rss>

