<?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: Committing after BAPI update. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425212#M203864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The bapi is not using update task, instead it's using perform on commit,  so you must have bapi commit after each bapi call, because, if you commit after certain number of records, only the last one is going to be commited. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jun 2006 19:12:12 GMT</pubDate>
    <dc:creator>sridhar_k1</dc:creator>
    <dc:date>2006-06-30T19:12:12Z</dc:date>
    <item>
      <title>Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425203#M203855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are running a job in PROD that is taking alot longer than anticipated and will continue to run for the next day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are doing a     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              wait = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After every bapi call, hence every record in the input file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it make sense to commit after every 1000 , if so:&lt;/P&gt;&lt;P&gt;1. How much time would we hope to gain (estimate)&lt;/P&gt;&lt;P&gt;2. what are the rollback issues?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425203#M203855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425204#M203856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should have mentioned . we do the following Rollbakc or commit after every record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.&lt;/P&gt;&lt;P&gt;    RAISE update_failed.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              wait = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425204#M203856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425205#M203857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's recommended to have BAPI COMMIT after each BAPI call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check code in the bapi if it's using update task, if it's there, SET UPDATE TASK LOCAL before the bapi call, it saves some time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425205#M203857</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T18:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425206#M203858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;before the bapi commit call ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425206#M203858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425207#M203859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, before the actual BAPI FM call, BTW what bapi is it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425207#M203859</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T18:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425208#M203860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'BAPI_OBJCL_CHANGE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            objectkey          = key&lt;/P&gt;&lt;P&gt;            objecttable        = c_table&lt;/P&gt;&lt;P&gt;            classnum           = c_num&lt;/P&gt;&lt;P&gt;            classtype          = c_type&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            allocvaluesnumnew  = it_num&lt;/P&gt;&lt;P&gt;            allocvaluescharnew = it_char&lt;/P&gt;&lt;P&gt;            allocvaluescurrnew = it_curr&lt;/P&gt;&lt;P&gt;            return             = it_ret.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425208#M203860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425209#M203861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that's the bottleneck? Have you checked ST05?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425209#M203861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425210#M203862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. I am not sure.  This cam second hand to me actually. I will have a look at the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425210#M203862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425211#M203863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THe bottleneck is actually more the db accesses it does prior to the BAPI call.  but considering the lookups are required... the only thing I can think of doing is not committing every record to try to speed this up ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 18:59:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425211#M203863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T18:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425212#M203864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The bapi is not using update task, instead it's using perform on commit,  so you must have bapi commit after each bapi call, because, if you commit after certain number of records, only the last one is going to be commited. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425212#M203864</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T19:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425213#M203865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you post the code of the database access. There may be issues there as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:14:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425213#M203865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T19:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425214#M203866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The database accesses are so many and cascade into many different function calls that its not feasible to post or analyse at this point.  I am looking at another workaround now since I know I cannot move the commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your effort. I would like to know how you tell the BAPI is using PERFORM on COMMIT?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425214#M203866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T19:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425215#M203867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the chain of FM calls leading to perform on commit: BAPI_OBJCL_CHANGE -&amp;gt;CACL_CLASSIFICATION_SAVE -&amp;gt;CLAP_DDB_SAVE_CLASSIFICATION -&amp;gt;  perform insert_classification on commit (line 91).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425215#M203867</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T19:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425216#M203868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just checked inside the perform  insert_classification  tatement, there's an  update task. Use SET UPDATE TASK LOCAL before the BAPI_OBJCL_CHANGE call, saves some time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yo still need to have bapi commit after the bapi call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:46:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425216#M203868</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T19:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425217#M203869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;waht are the implications of adding &lt;/P&gt;&lt;P&gt;SET UPDATE TASK LOCAL before the BAPI call.  I read the documentation but not really clear on what it will add.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use it, do I need do do the BAPI COMMIT with a WAIT or without .   I ask because the docuemtation states (see *)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The update works as before. The only difference is that it is not performed in a separate process, but in the same process as the calling program, i.e. when a COMMIT WORK occurs, &lt;STRONG&gt;processing does not continue until all the update requests have been performed&lt;/STRONG&gt;. In the standard setting, the normal update task is always active.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 19:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425217#M203869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-30T19:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Committing after BAPI update.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425218#M203870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Commit work an wait, keeps the calling program work process waiting untill all update tasks complte in the update work process.&lt;/P&gt;&lt;P&gt;  Set update task local, makes all FM calls in update task to process in the calling program work process instead of update work process.&lt;/P&gt;&lt;P&gt;  If a program is executing in background, waiting for update process to finish for each record takes time. SO if there are few table updates, set upd task local executes faster.&lt;/P&gt;&lt;P&gt; I've used this statement without any complications in scenarios like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI commit with and without WAIT works the same if set upd task locl is used, but I would use BAPI commit with wait because, some bapis calls multiple commits, which deactivates local update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2006 20:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/committing-after-bapi-update/m-p/1425218#M203870</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-30T20:13:08Z</dc:date>
    </item>
  </channel>
</rss>

