<?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: ROLLBACK after failure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559028#M1658900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using commit work before step 4 because you step 4 is dependent on data provided from previous steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that if the BDC in the 4th step fails, then steps 1, 2 should be be ROLLBACKed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Commit work is the last state of a transaction flow and you cannot rollback the previous step. The only way I see is to call BAPI_GOODSMVT_CANCEL and reverse the goods movement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what do you mean by &lt;STRONG&gt;logs&lt;/STRONG&gt; exactly. Is it the change documents or something else ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2012 05:48:05 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2012-02-09T05:48:05Z</dc:date>
    <item>
      <title>ROLLBACK after failure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559025#M1658897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am calling the following FMs in the sequence:&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;BAPI_GOODSMVT_CREATE&lt;/STRONG&gt; using movement type &lt;STRONG&gt;261&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. &lt;STRONG&gt;BAPI_GOODSMVT_CREATE&lt;/STRONG&gt; using movement type &lt;STRONG&gt;101&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3. COMMIT WORK to generate a handling unit number.&lt;/P&gt;&lt;P&gt;4. A FM &lt;STRONG&gt;L_TO_CREATE_SINGLE&lt;/STRONG&gt; (that unpacks and repacks handling units) uses the handling unit number of step 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that if the BDC in the 4th step fails, then steps 1, 2 should be be ROLLBACKed. &lt;/P&gt;&lt;P&gt;To my understanding if I have a ROLLBACK work after step 4, then the COMMIT work in step 3 prevents the ROLLBACK of steps 1 and 2.&lt;/P&gt;&lt;P&gt;I cannot remove the COMMIT in step 3 as the HU number is not being generated (which I need in step 4) in case I remove the COMMIT WORK.       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried calling the FM in step 4 in UPDATE TASK, but no luck. &lt;/P&gt;&lt;P&gt;Please help, how to go about this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 13:34:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559025#M1658897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: ROLLBACK after failure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559026#M1658898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you cannot generate the Handling unit number with out commit work then probably u need to do a reversal ( ie post with the reversal movement type for 261 and 101) when the 4th step fails&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 13:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559026#M1658898</guid>
      <dc:creator>mithun_shetty4</dc:creator>
      <dc:date>2012-02-08T13:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: ROLLBACK after failure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559027#M1658899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for replying. &lt;/P&gt;&lt;P&gt;I find that idea as a potential solution to my problem.&lt;/P&gt;&lt;P&gt;If I use your approach, I believe a system log will be created showing the information about the reversal. However since the whole process takes place behind a online program, I do not want information of the reversal from getting logged for every time the repack unpack fails due to (say) wrong input from user.&lt;/P&gt;&lt;P&gt;Is there any way to delete the information in the log, that would not allow it getting logged every time in the intermediate phase?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 14:21:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559027#M1658899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: ROLLBACK after failure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559028#M1658900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using commit work before step 4 because you step 4 is dependent on data provided from previous steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is that if the BDC in the 4th step fails, then steps 1, 2 should be be ROLLBACKed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Commit work is the last state of a transaction flow and you cannot rollback the previous step. The only way I see is to call BAPI_GOODSMVT_CANCEL and reverse the goods movement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what do you mean by &lt;STRONG&gt;logs&lt;/STRONG&gt; exactly. Is it the change documents or something else ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 05:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rollback-after-failure/m-p/8559028#M1658900</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-09T05:48:05Z</dc:date>
    </item>
  </channel>
</rss>

