<?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: Call FM in update task in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793318#M1778771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be working fine if you check for the SY-SUBRC after the database update statement and error message should be shown after that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Oct 2013 10:32:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-10-04T10:32:30Z</dc:date>
    <item>
      <title>Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793310#M1778763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am calling 2 FM's in my program . one FM is updating a table zabc and other FM is inserting into table zxyz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is either both ztables should be updated or none should be updated so i call the FM's in update task&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use commit work at end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however issue comes in the following case -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. FM1 - updated record fine in zabc&lt;/P&gt;&lt;P&gt;2. FM2 - here i try to insert with key field that is already existing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as second FM did not insert the values in the table zxyz , i think even the record in zabc should not be inserted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when the commit work is executed record is updated in first table but not in the second table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should it not be a single LUW and NOT insert entry in the first table ?&amp;nbsp;&amp;nbsp; how do i achieve this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 18:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793310#M1778763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-03T18:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793311#M1778764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you've got this a little backwards.&amp;nbsp; Don't put them in update task.&amp;nbsp; run them synchronously back to back.&amp;nbsp; If they both succeed, then commit, else rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 18:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793311#M1778764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-03T18:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793312#M1778765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,kindly look at the thread &lt;A __default_attr="3185942" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://community.sap.com/" modifiedtitle="true" title="Commit Work"&gt;&lt;/A&gt; same kind of discussion is already there. please try it once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 02:20:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793312#M1778765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-04T02:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793313#M1778766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but my question is as per the concept ...all the FM which are in update task should be called in same LUW&amp;nbsp; when commit work is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if 1 FM has a insert statement that works and other FM has insert statement that does not work then when commit work executes should it not rollback the first insert and then send an error through sapmail and then i should be able to monitor that error in sm13???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what the documentation says&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 03:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793313#M1778766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-04T03:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793314#M1778767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema Plz share your code for more info&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 03:36:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793314#M1778767</guid>
      <dc:creator>dhruv_mehta</dc:creator>
      <dc:date>2013-10-04T03:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793315#M1778768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did u put breakpoin for update task.? plz do the same anc check for sy-subrc i strongly feel it is an issue there because 1 table is upated and other is not seems to me is not possible,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 03:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793315#M1778768</guid>
      <dc:creator>dhruv_mehta</dc:creator>
      <dc:date>2013-10-04T03:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793316#M1778769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The update process will not terminate by itself if some table update just fails(unless an exception is triggered by system). So, you have to terminate it by yourself. This is how it should be ideally done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check for sy-subrc value during the insertion. If it fails,&lt;STRONG&gt; trigger a message of any type except 'S' inside the update FM itself&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will terminate the update task and roll back the entries in the first table as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Mahesh Madhavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 03:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793316#M1778769</guid>
      <dc:creator>mahesh_madhavan</dc:creator>
      <dc:date>2013-10-04T03:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793317#M1778770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As others said,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process both the FM Synchronously one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavan.N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 04:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793317#M1778770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-04T04:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Call FM in update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793318#M1778771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be working fine if you check for the SY-SUBRC after the database update statement and error message should be shown after that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 10:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-fm-in-update-task/m-p/9793318#M1778771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-04T10:32:30Z</dc:date>
    </item>
  </channel>
</rss>

