<?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: Starting new task inside an Update Task in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584546#M1860534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You don't&amp;nbsp; need a workflow.&lt;/P&gt;&lt;P&gt;What you can do is just create a simple task and bind it to a class.&lt;/P&gt;&lt;P&gt;For the task you have option of either binding to a business object or to a class.&lt;/P&gt;&lt;P&gt;So use the option for a class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The task should be triggered at the event of material document creation event.&lt;/P&gt;&lt;P&gt;In the method of the class you can call the function module you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 19:22:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-09-05T19:22:52Z</dc:date>
    <item>
      <title>Starting new task inside an Update Task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584543#M1860531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I need an expert opinion for a problem I'm facing at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is this: I need to trigger a function module during the update task of a material document.&lt;/P&gt;&lt;P&gt;This function module however should not slow down the posting of the document, so it must not be in the same LUW, but in a separate task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: does it work to call a function module with STARTING NEW TASK inside an UPDATE TASK (for example a user exit) and if it does work, what's your opinion on it? Is if safe? Does it come with problems? According to the SAP documentation, STARTING NEW TASK does not trigger a COMMIT when it's called inside an update task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alternative would be to trigger a work flow, but that's much more work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 11:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584543#M1860531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-05T11:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Starting new task inside an Update Task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584544#M1860532</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 may be completely mistaken, but I interpret the following quote from &lt;A href="http://help.sap.com/abapdocu_740/en/abapcall_function_starting.htm"&gt;ABAP Docu &lt;/A&gt;to mean: STARTING NEW TASK does implicit COMMIT:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Asynchronous RFC triggers a &lt;A href="http://help.sap.com/abapdocu_740/en/abendatabase_commit_glosry.htm"&gt;database commit&lt;/A&gt; in the calling program. An sRFC during the &lt;A href="http://help.sap.com/abapdocu_740/en/abenupdate_glosry.htm"&gt;update&lt;/A&gt; is an exception to this.&lt;/P&gt;



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Meaning - there is no commit if you omitt STARTING_NEW_TASK - use sysnchronous RFC...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where did you read that it does not trigger COMMIT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 12:06:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584544#M1860532</guid>
      <dc:creator>Private_Member_7726</dc:creator>
      <dc:date>2014-09-05T12:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Starting new task inside an Update Task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584545#M1860533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Janis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to reiterate this aRFC call triggers an implicit &lt;SPAN style="text-decoration: underline;"&gt;database commit&lt;/SPAN&gt;. So the OP is partially correct &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/994/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="649404" __jive_macro_name="user" class="jive_macro_user jive_macro" data-orig-content="Klaus Kronawetter" href="https://community.sap.com/"&gt;&lt;/A&gt; we have 2 things which we need to consider -&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Asynchronous RFC triggers a &lt;SPAN style="text-decoration: underline;"&gt;database commit&lt;/SPAN&gt; in the calling program.&lt;/LI&gt;&lt;LI&gt;Any database commits or database rollbacks that occur within the update task cancel the update.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply put, as per SAP documentation, you cannot use aRFC within an update task.&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>Fri, 05 Sep 2014 12:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584545#M1860533</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-09-05T12:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Starting new task inside an Update Task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584546#M1860534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You don't&amp;nbsp; need a workflow.&lt;/P&gt;&lt;P&gt;What you can do is just create a simple task and bind it to a class.&lt;/P&gt;&lt;P&gt;For the task you have option of either binding to a business object or to a class.&lt;/P&gt;&lt;P&gt;So use the option for a class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The task should be triggered at the event of material document creation event.&lt;/P&gt;&lt;P&gt;In the method of the class you can call the function module you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 19:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/starting-new-task-inside-an-update-task/m-p/10584546#M1860534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-05T19:22:52Z</dc:date>
    </item>
  </channel>
</rss>

