<?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: DB Update from BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093921#M1615725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you mean that after each update check sy-subrc eq 0, if not then what should be next step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say Sy-subrc comes 4, how should i pass this back to calling FM so that i stop the commit work ( which is outside the FM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update task FM does not allow export parameters..&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, 10 Aug 2011 19:15:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-10T19:15:43Z</dc:date>
    <item>
      <title>DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093919#M1615723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a RFC FM ( BAPI) which will be called from external system. The role of this FM is insert to 3 different  Z tables.  Table structure's  is like Header, Details &amp;amp; Sub details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement is if the insert/update fails on Header than all other insert/update should fail  Also i need to report back any errors to calling system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have designed the BAPI in such way that after some initial data check, i call another FM in update task.&lt;/P&gt;&lt;P&gt;Inside this FM i am doing insert/update. After coming out i am doing Commit Work. Also setting  SET UPDATE TASK LOCAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My doubt is &lt;/P&gt;&lt;P&gt;(1) how would this handle a situation where update in header fails so all other update are rejected.&lt;/P&gt;&lt;P&gt;(2)  I would like to let the other system know, if the insert is good or fail. Since Update task does not allow export, how to handle this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice the best solution for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 18:47:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093919#M1615723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T18:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093920#M1615724</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;P&gt;Please use &lt;STRONG&gt;COMMIT WORK AND WAIT&lt;/STRONG&gt; and check SY-SUBRC after each table update which will make sure update of every step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI - &lt;STRONG&gt;SET UPDATE TASK LOCAL&lt;/STRONG&gt; use same work process and does not update VBLOG table.&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, 10 Aug 2011 19:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093920#M1615724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093921#M1615725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you mean that after each update check sy-subrc eq 0, if not then what should be next step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say Sy-subrc comes 4, how should i pass this back to calling FM so that i stop the commit work ( which is outside the FM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update task FM does not allow export parameters..&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, 10 Aug 2011 19:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093921#M1615725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T19:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093922#M1615726</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;P&gt;My intention was to suggest not to use FM in update task and update one by one (header, details &amp;amp; sub-details) using commit work and wait. Because I understood from requirement, here we do not need complex DB handling...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to make clear - update task function module triggered when commit work statement encounters in program (before commit work all update module registered) and although it does not support import but can access global data of function group / program.&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, 10 Aug 2011 20:14:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093922#M1615726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T20:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093923#M1615727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally i would like to do in one go. Insert in 3, if success Commit or roll back. How should i achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 21:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093923#M1615727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-10T21:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: DB Update from BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093924#M1615728</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;P&gt;I agree with the last post, it's useless to use update task for a simple update process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want to create a BAPI, then COMMIT WORK is forbidden, the commit is the responsibility of the calling application (by calling BAPI_TRANSACTION_COMMIT by RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you want to know if the INSERT are okay, just test SY-SUBRC, and return an exporting parameter which gives the status if it's okay or not (if it's a BAPI, that should be parameter RETURN of type table of BAPIRET2). The calling program will then be able to commit or rollback (using BAPI_TRANSACTION_ROLLBACK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 21:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-update-from-bapi/m-p/8093924#M1615728</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-08-10T21:59:48Z</dc:date>
    </item>
  </channel>
</rss>

