<?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: Using Bapi Commit after Rollback in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300077#M502578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try without passing 'X' to nocommit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2007 15:27:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-29T15:27:22Z</dc:date>
    <item>
      <title>Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300073#M502574</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 have a problem using the FM's BAPI_TRANSACTION_COMMIT and BAPI_TRANSACTION_ROLLBACK. In my case I submit several records for one employee using the FM HR_INFOTYPE_OPERATION with NOCOMMIT = 'X'. If an error occurs submitting any of these records I rollback all the records using BAPI_TRANSACTION_ROLLBACK. So far no problems. If I submit the next set of records for the next employee and this time call the commit, the records I previously rollbacked are commited as well! Does anyone know how I can prevent that rollbacked records are commited in a later phase?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      infty            = p_infty&lt;/P&gt;&lt;P&gt;      number        = p_pernr&lt;/P&gt;&lt;P&gt;      subtype       = p_subty&lt;/P&gt;&lt;P&gt;      validitybegin = p_begda&lt;/P&gt;&lt;P&gt;      validityend    = p_endda&lt;/P&gt;&lt;P&gt;      recordnumber  = p_seqnr&lt;/P&gt;&lt;P&gt;      record           = p_infty_record&lt;/P&gt;&lt;P&gt;      operation        = p_operation&lt;/P&gt;&lt;P&gt;      nocommit      = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return        = bapireturn1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300073#M502574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300074#M502575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but you could try a commit after the rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300074#M502575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300075#M502576</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;This is strange. Each BAPI call has a separate LUW(Logical Unit of Work) &amp;amp; it doesnt overlap with call of COMMIT WORK of another BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also since you are passing NOCOMMIT = 'X', the FM of HR_INFOTYPE_OPERATION has the logic to Rollback the changes if error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to retest the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300075#M502576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300076#M502577</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 don't know the fm 'HR_INFOTYPE_OPERATION', but I suppose if u set the parameter NOCOMMIT, that fm doesn't force any COMMIT after posting the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u shouldn't need any ROLLBACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:20:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300076#M502577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300077#M502578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try without passing 'X' to nocommit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300077#M502578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300078#M502579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried a commit after the rollback but that didn't work. The problem is that I want to submit seven records (containing hours worked each day of a week) for each employee and if an error occurs in any of these records I want to rollback all of the seven records. In this case I also need to rollback the successful created records. If the next set of seven records don't contain any errors I want to submit a commit just for these seven records. Now the rollbacked records are commited as well. It seems like these records are still somewhere in a buffer which need to be cleared......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:39:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300078#M502579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300079#M502580</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;Are you sure that the COMMIT WORK of anothe BAPI is updating changes of the the BAPI for which you wanted to ROLLBACK Changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i feel is the 1st ROLLBACK itself is called after COMMIT WORK, which possibly could be inside the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just checked the FM &amp;amp; other calls inside the FM's.&lt;/P&gt;&lt;P&gt;Please pass NOCOMMIT as Blank. This should solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:47:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300079#M502580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300080#M502581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vidya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried submitting the FM HR_INFOTYPE_OPERATION without the NOCOMMIT = 'X', still no luck...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:47:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300080#M502581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300081#M502582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Submit seven records with no_commit = 'X'. If everything is OK, resubmit them with a commit. Continue with the next group of seven records and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 15:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300081#M502582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T15:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300082#M502583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution, when I call the BAPI with the nocommit='X', the program creates no records in the database. Whenever I add just one BAPI call to the program with a nocommit = space all the records that were previously created with the nocommit are still commited to the database. In this case I didn't use the FM's BAPI_TRANSACTION_ROLLBACK or BAPI_TRANSACTON_COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 16:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300082#M502583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T16:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300083#M502584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am not sure, but this kind of bunching (either all or none)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. will not work with HR_INFOTYPE_OPERATION&lt;/P&gt;&lt;P&gt;    and neither bapi_rollback/commit will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. We can either save/not save&lt;/P&gt;&lt;P&gt;   one infotype at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 16:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300083#M502584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300084#M502585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  U can use the statement 'FREE MEMORY'  after U roll back the error data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 06:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300084#M502585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T06:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300085#M502586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried FREE MEMORY and DELETE FROM MEMORY ID 'PROPOSED_VALUES' to clear the rollbacked records from the memory. This doesn't work. Does anyone know any other statements to clear the memory? I think that would be the solution to the problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 12:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300085#M502586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300086#M502587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems that I found a solution to this problem. In order to use the FM HR_INFOTYPE_OPERATION in simulation mode, I use the parameter operation &amp;lt;b&amp;gt;'CHK'&amp;lt;/b&amp;gt; (CHECK_RECORD). This way it's possible to check the validity of a set of records before adding them to the database with an operation insert or modify. If the FM returns an error in any of the records no rollback has to be performed. I just skip the modify/insert part and proceed to the next set of records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greets,&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2007 09:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300086#M502587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-31T09:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Bapi Commit after Rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300087#M502588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to this thread:&lt;/P&gt;&lt;P&gt;My colleague found a way to succesful clear the buffer by using the FM &amp;lt;b&amp;gt;HR_PSBUFFER_INITIALIZE&amp;lt;/b&amp;gt;. This FM uses no parameters, it just refreshes the infotype buffers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 11:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-commit-after-rollback/m-p/2300087#M502588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T11:51:04Z</dc:date>
    </item>
  </channel>
</rss>

