<?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 Commit and Roll Back in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330203#M512641</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;    Can any one give an example for commit and rollback &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    as well as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can u give me the statement for commit and rollback&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  with Eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks&lt;/P&gt;&lt;P&gt;  Imran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jun 2007 07:38:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-03T07:38:58Z</dc:date>
    <item>
      <title>Commit and Roll Back</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330203#M512641</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;    Can any one give an example for commit and rollback &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    as well as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can u give me the statement for commit and rollback&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  with Eg: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks&lt;/P&gt;&lt;P&gt;  Imran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 07:38:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330203#M512641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T07:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Commit and Roll Back</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330204#M512642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;COMMIT is used to commit/update the records in database after your query&lt;/P&gt;&lt;P&gt;Rollback will rollout the changes that were made to database using the query.&lt;/P&gt;&lt;P&gt;when we use BAPI's for creation/updation ofrecords we use the BAPI&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' for committing records&lt;/P&gt;&lt;P&gt;ROLLBACK WORK&lt;/P&gt;&lt;P&gt;Terminates a SAP-LUW without storing the changes. &lt;/P&gt;&lt;P&gt;The statement ROLLBACK WORK closes the current SAP-LUW and opens a new one. In doing so, all change requests of the current SAP-LUW are canceled. To do this, ROLLBACK WORK carries out the following actions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT work&lt;/P&gt;&lt;P&gt;Terminates an SAP LUW and stores the changes&lt;/P&gt;&lt;P&gt;The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the current SAP LUW in the process. In this case, COMMIT WORK performs the following actions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for further help&lt;/P&gt;&lt;P&gt;write these statements in the program and press F1 you will get the necessary SAP help with examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anji Reddy Vangala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 07:42:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330204#M512642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T07:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Commit and Roll Back</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330205#M512643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normally data is sent to BAPI for processing. Now, if 1 record has been processed successfully, the COMMIT works gets triggered internally. So, Commit works as such when an entry is processed successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u pass data and inbetween BAPI fails due to some reason, ROLL BACK gets triggered and the updates that has happened for that particular record data are been roll backed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need ur reward points&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 08:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330205#M512643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T08:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Commit and Roll Back</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330206#M512644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Imran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPIs are indeed a good example to explain the use of commit work and rollback. BAPIs are RFC-enabled function modules  that allow us to access SAP business objects (e.g. materials) from outside.&lt;/P&gt;&lt;P&gt;In case of failure BAPIs do not raise any exceptions but usually return the collected messages in a TABLES parameter RETURN (of line type BAPIRET2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After calling a BAPI you have to evaluate the returned messages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  lt_return    TYPE BAPIRETTAB (table type of BAPIRET2).


  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA' 
    EXPORTING
       ...
    IMPORTING
      ...
    TABLES
     ...
       return = lt_return.

  LOOP AT lt_return TRANSPORTING NO FIELDS
                 WHERE ( type CA 'AEX' ).  " (A)bort, (E)rror, X=dump
    EXIT.
  ENDLOOP.
  IF ( syst-subrc = 0 ).
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

  ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING  
        wait = 'X'.  " synchronous
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that BAPIs may or may not return a Success message (type='S') in case of success. An empty RETURN messages indicates a successful BAPI call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 09:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-and-roll-back/m-p/2330206#M512644</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-06-03T09:09:32Z</dc:date>
    </item>
  </channel>
</rss>

