<?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: COMMIT WORK in BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403564#M1925330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you would require to update the custom table while throwing the error message.&lt;/P&gt;&lt;P&gt;You could write the logic to update the ztable in a custom function module and create it as RFC enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before throwing the error message in your badi, you could call like this&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZTEST' STARTING NEW TASK 'T1'&lt;/P&gt;&lt;P&gt;&amp;nbsp; DESTINATION 'NONE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module ZTEST will be executed in a separate task and do not influence the standard program flow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthikeyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Dec 2015 14:18:47 GMT</pubDate>
    <dc:creator>karthikeyan_p3</dc:creator>
    <dc:date>2015-12-17T14:18:47Z</dc:date>
    <item>
      <title>COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403559#M1925325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been working on one issues, which is - In the BADI, we have one check, if that check fails then create a log in the table and raise an error message to stop the transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Variable NE &amp;lt;Value&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FM &amp;lt;fm1&amp;gt; which have UPDATES statements and FMs. ( And require COMMIT statement.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE &amp;lt;&amp;gt; RAISE error_occurred.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If i keep COMMIT statement after FM, there could be chance of unnecessary updates to DB.&lt;/P&gt;&lt;P&gt;2.There would be no use of 'IN UPDATE TASK' to the FM as this will not go to the update task since we are raising error message. Still i tried but no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to handle this issue? Appreciate if someone could give me a way to handle this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 18:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403559#M1925325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-16T18:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403560#M1925326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost every BADi has a parameter and a method where in we can pass our messages. Do a scan of your BADi (methods) to check if we have any such parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a COMMIT WORK to trigger for your database the design should be like check everything is okay or not only then fire your update FM's. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Varun &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 18:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403560#M1925326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-16T18:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403561#M1925327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope we can add ROLLBACK WORK statement before calling the FM, can we?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;IF Variable NE &amp;lt;Value&amp;gt;.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-size: 13.3333px;"&gt;ROLLBACK &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 13.3333px;"&gt;WORK&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 13.3333px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-size: 13.3333px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FM &amp;lt;fm1&amp;gt; which have UPDATES statements and FMs. ( And require COMMIT statement.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE &amp;lt;&amp;gt; RAISE error_occurred.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 19:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403561#M1925327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-16T19:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403562#M1925328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Srikanth, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can definitely make use of the statement ROLLBACK WORK but with this you ignoring all the changes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No logical point in writing ROLLBACK when you are not committing any changes to DB! Were you not able to find any parameters for capturing messages or is it not available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, &lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 13:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403562#M1925328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-17T13:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403563#M1925329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srikanth, Did you try CALL FUNCTION IN BACKGROUND TASK ? This creates a separate LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, AFAIK, there might be some other methods within BADI implementation that can be used which is called during update. Do check documentation if available for the BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 14:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403563#M1925329</guid>
      <dc:creator>kirankerudi</dc:creator>
      <dc:date>2015-12-17T14:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403564#M1925330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you would require to update the custom table while throwing the error message.&lt;/P&gt;&lt;P&gt;You could write the logic to update the ztable in a custom function module and create it as RFC enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before throwing the error message in your badi, you could call like this&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZTEST' STARTING NEW TASK 'T1'&lt;/P&gt;&lt;P&gt;&amp;nbsp; DESTINATION 'NONE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module ZTEST will be executed in a separate task and do not influence the standard program flow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthikeyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 14:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-badi/m-p/11403564#M1925330</guid>
      <dc:creator>karthikeyan_p3</dc:creator>
      <dc:date>2015-12-17T14:18:47Z</dc:date>
    </item>
  </channel>
</rss>

