<?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: How to rollback batch input process? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872557#M50140</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;How are you updating the documents ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2005 08:10:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-04-05T08:10:37Z</dc:date>
    <item>
      <title>How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872554#M50137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example:  I wanna post 10 documents, and all the posting should happen as a logical unit of work, i,e. either everything should be posted successfully or nothing should be posted. If error occured in the 7th record, i should rollback the posted 6 documents. How shall i do? It seems can't just use 'call transaction' clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 04:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872554#M50137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T04:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872555#M50138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a separate concept in SAP for handling scenarios precisely such as yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the secion on &amp;lt;i&amp;gt;Programming Database Updates&amp;lt;/i&amp;gt; at the follwoing link - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The path at the above link would be : &amp;lt;i&amp;gt;The ABAP Programming Language --&amp;gt; Saving Data Externally --&amp;gt; Programming Database Updates&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 04:48:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872555#M50138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T04:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872556#M50139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,Anand &lt;/P&gt;&lt;P&gt;  i've read the document you provided, but still have no idea about the detailed approach. could you specify it to me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 07:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872556#M50139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T07:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872557#M50140</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;How are you updating the documents ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 08:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872557#M50140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T08:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872558#M50141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really think that what you are trying to do is possible using a batch input process.  This is because the batch input process (either submitting to the SM35 queue or using 'call transaction' from abap) calls the underlying SAP screen transaction, which has a 'COMMIT WORK' coded into it.  So once a transaction/document has been posted, it will not really be possible to roll it back if subsequent postings fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that BAPIs are your best bet (if one exists for your desired document).  As they do not have explicit 'COMMIT WORK' statements built in, you are then able to control whether all transactions should be comitted, or rolled back. So, you could call the BAPIs in sequence, checking the return structure from each call, and if any fail, execute a 'ROLLBACK WORK' which would roll back all updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may not be exactly what you wanted to hear, but I believe its the best way to achieve what you are trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 08:41:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872558#M50141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T08:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872559#M50142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid what you're seeking to accomplish is not possible.&lt;/P&gt;&lt;P&gt;And I don't think it makes too much sense. Let us say, you are &lt;/P&gt;&lt;P&gt;using a CALL TRANSACTION, then each CALL TRANSACTION is supposed &lt;/P&gt;&lt;P&gt;to be consistent and complete in itself.....and you cannot span &lt;/P&gt;&lt;P&gt;an LUW across multiple transactions....it is so much against the &lt;/P&gt;&lt;P&gt;concept of an LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To give you a slightly non-technical explanation, you must first &lt;/P&gt;&lt;P&gt;ask yourself the question 'Why do we use BATCH INPUT'? Is it not &lt;/P&gt;&lt;P&gt;to just reduce the manual creation of all the documents in their &lt;/P&gt;&lt;P&gt;corresponding transactions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your case, let us assume that we have only 3 documents to &lt;/P&gt;&lt;P&gt;be posted and you have decided to post them yourself online, using &lt;/P&gt;&lt;P&gt;the relevant transactions. You finish successfull posting the first &lt;/P&gt;&lt;P&gt;two documents and then find that there's some error in the third one.&lt;/P&gt;&lt;P&gt;How are you going to roll back the previous two? You would have to &lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;delete&amp;lt;/i&amp;gt; them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So even in this case, you can only do a delete operation. Not a ROLLBACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I don't think your requirement makes much sense. Why should &lt;/P&gt;&lt;P&gt;the other documents be rolled back if something else fails ? They are quite &lt;/P&gt;&lt;P&gt;independent , right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you really want to stick to this functionality, then the option that &lt;/P&gt;&lt;P&gt;is left for you is to find out if there are any Function Modules available to &lt;/P&gt;&lt;P&gt;do the DELETE operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, if I were you, I would use the MESSAGES option for the CALL TRANSACTION &lt;/P&gt;&lt;P&gt;statement and display them to the user, so that he would know which transaction &lt;/P&gt;&lt;P&gt;had failed. He can then continue with the remaining documents after detecting the &lt;/P&gt;&lt;P&gt;error and correcting it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that is clear. Please do get back if you have further doubts. Else, please &lt;/P&gt;&lt;P&gt;reward points and mark the question as "answered".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2005 08:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872559#M50142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-05T08:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to rollback batch input process?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872560#M50143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've faced such a problem before, but in more general manner. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement was to provide the mechanism to control execution of sequences of interrelated "transactions" (batch inputs, BAPI's or simple function modules call's), which forms some business processes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, there isn't any ROLLBACK TRANSACTION for CALL TRANSACTION, furthermore for some scenarios calling BAPI's with BAPI_TRANSACTION_COMMIT call at the end doesn't work(when following BAPI call depends on results of previous one). So requirement to extend SAP's transaction concept arise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object oriented programming in general and ABAP Objects in particular best suits for "Business Transaction" &lt;/P&gt;&lt;P&gt;implementation. Without going into details I'll provide conceptual description. "Business Transaction" is an abstraction that incapsulates all the data and behaviour needed for execution and "unexecution" of specific operation. "Unexecution" means necessary actions that restore enviroment' previous state. For example - posting and reversing documents. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've defined the base class for business transaction abstraction, and concrete transactions, which implement business logic(by batch inputs, FM calls and so on), as base class specializations. For managing transaction sequences I make use of "composite" design pattern. So transaction sequences could be treated as separate transaction steps and could be used to form more complicated business processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope such general description helps in choosing the implementation approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Maxim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2005 05:22:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-rollback-batch-input-process/m-p/872560#M50143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-06T05:22:41Z</dc:date>
    </item>
  </channel>
</rss>

