<?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: COMMIT WORK in USEREXIT_SAVE_DOCUMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474116#M1417797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Removed the COMMIT WORK Statement and it worked perfectly. Thanks to everyone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jan 2010 13:01:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-21T13:01:08Z</dc:date>
    <item>
      <title>COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474111#M1417792</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 an issue  with COMMIT WORK statement written in USEREXIT_SAVE_DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Issue :-&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am creating Sales Orders using Idocs ( Process Code : ORDE , Function module : IDOC_INPUT_ORDERS )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Above mentioned FM does a call transaction BDC on VA01 transaction and creates Sales Orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. The problem that I am facing is Idoc gets failed with Status 51, but Sales Order is getting saved in the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. After analysing further, I got to know that there is a statement COMMIT WORK written in USEREXIT_SAVE_DOCUMENT and it  causing this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. System reaches the above statement and it executes COMMIT WORK and completely comes out of the above mentioned "exit" and "Sales Order processing" without executing the statements followed by that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Now, the control is returned to Idoc processing which is nothing but the FM   IDOC_INPUT_ORDERS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. It simply searches for the message No.311 (Success message "Sales Document XXXXXX has been saved" that gets generated by Sales Order and as it could not find that, it simply turns the Idoc status to 51(which is failure status).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. The reason why it could not find the mesage 311 is because of the commit statement which did not execute any of the statements after that including standard SAP statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now, I can remove the COMMIT WORK Statement and my Idoc can be seen in status 53.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But, the question is I am seeing this issue only in our Testing Server. It works well with the same code in our development server and none of the Idocs gets into 51. All the Idocs in dev server gets posted successfully. I observed that it passes through COMMIT WORK Statement and executes the statements that are written after that.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am puzzled with this behaviour. Could you please help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474111#M1417792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T12:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474112#M1417793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there anyone who can help me with this???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 13:38:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474112#M1417793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T13:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474113#M1417794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no need to write a COMMIT Statement in the USEREXIT_SAVE_DOCUMENT. The sales order will get saved automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 13:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474113#M1417794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T13:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474114#M1417795</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;As per my understanding, it shouldn't work even in development system. Not sure of the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if that commit work is coded by you, please remove that statement. Transaction commit will happen once the order is saved and it will take care of other functionalities intended for that COMMIT. If that code is not yours, you can think of using below solution (To be on safe side as removing that may cause some other functionality to fail.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create an RFC FM and issue that commit work in that FM by calling the FM in &lt;STRONG&gt;BACKGROUND TASK&lt;/STRONG&gt;. Ideally this should solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 15:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474114#M1417795</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-01-07T15:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474115#M1417796</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;a COMMIT WORK is always wrong in any kind of userexit, because userexits are add-ons to SAP standard transactions. Usually the DB upadte is done in the update task modules. Update task modules are  queued by 'CALL FUNCTION IN UPDATE TASK" and released (started) by COMMIT WORK. Thats why COMMIT work is strictly forbidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove that from  the userexit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 21:56:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474115#M1417796</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-01-07T21:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK in USEREXIT_SAVE_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474116#M1417797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Removed the COMMIT WORK Statement and it worked perfectly. Thanks to everyone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 13:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-userexit-save-document/m-p/6474116#M1417797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T13:01:08Z</dc:date>
    </item>
  </channel>
</rss>

