<?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: Exception triggering Commit work. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376059#M1642406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is that the code in your RAISE_EXCEPTION method contains a statement that is leading to an implicit database commit. Are you showing an information message? That would be the source of your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this page you will find all the possible causes of an implicit commit.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw73ehp1/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw73ehp1/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2011 09:54:32 GMT</pubDate>
    <dc:creator>arseni_gallardo</dc:creator>
    <dc:date>2011-11-29T09:54:32Z</dc:date>
    <item>
      <title>Exception triggering Commit work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376058#M1642405</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;I need to update a seris of tables and they must be transactional, i.e. all the data must be updated or not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*Fetch and Update Reference Profile Data
  me-&amp;gt;process_rp_data( ).

*Fetch and Update Request Data
  me-&amp;gt;process_req_data( ).

*Fetch and Update Collateral Data
  me-&amp;gt;process_coll_data( ).

*Fetch and Update Project Data
  me-&amp;gt;process_project_data( ).

  IF i_update_flag IS INITIAL.
    ROLLBACK WORK.
  ELSE.
    COMMIT WORK.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in all the above four methods there are update statements like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  TRY .
      UPDATE (i_table_name) SET bp_number = sur_bp WHERE (lt_dyn_cond).
      IF sy-subrc NE 0.

        me-&amp;gt;raise_exception( EXPORTING i_text_id    = zcx_rms_dedupe_process_excptns=&amp;gt;error_in_update
                                       i_bp_num     = vic_bp
                                       i_guid       = i_guid
                                       i_table_name = i_table_name
                                       i_process    = i_process ).
      ENDIF.

    CATCH cx_sy_dynamic_osql_error.
      me-&amp;gt;raise_exception( EXPORTING i_text_id    = zcx_rms_dedupe_process_excptns=&amp;gt;error_in_update
                                     i_bp_num     = vic_bp
                                     i_guid       = i_guid
                                     i_table_name = i_table_name
                                     i_process    = i_process ).
  ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in the third method, if the exception &lt;STRONG&gt;cx_sy_dynamic_osql_error&lt;/STRONG&gt; is raised all the data that is updated in the first two methods are commited. Can any one help how to overcome this situtation. I do not want the data to be committed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 07:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376058#M1642405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-29T07:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exception triggering Commit work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376059#M1642406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is that the code in your RAISE_EXCEPTION method contains a statement that is leading to an implicit database commit. Are you showing an information message? That would be the source of your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this page you will find all the possible causes of an implicit commit.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw73ehp1/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw73ehp1/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 09:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376059#M1642406</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-11-29T09:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exception triggering Commit work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376060#M1642407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I need to update a seris of tables and they must be transactional, i.e. all the data must be updated or not.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is the perfect use case of "Update task". Why are you not using it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call the Update FMs inside the methods. In the update FM you can put your code to update the DB tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 10:14:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376060#M1642407</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-11-29T10:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exception triggering Commit work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376061#M1642408</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;My main question is that the why Exception I am raising is triggering a database commit. I am not even displaing an information message. I am simply outputing a write statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[DataBase Commit|http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gives more information on Database commit but it does not mention this case. So wanted to know my mistake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 12:18:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376061#M1642408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-29T12:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exception triggering Commit work.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376062#M1642409</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 system is committing update while raising exception then roll back your work before exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 13:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-triggering-commit-work/m-p/8376062#M1642409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-29T13:05:07Z</dc:date>
    </item>
  </channel>
</rss>

