<?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 Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871679#M49979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wasn't going crazy after all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to see that you got it going.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please close off the thread.&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, 10 May 2005 07:06:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-10T07:06:14Z</dc:date>
    <item>
      <title>Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871665#M49965</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;I am callinf a Z FM from an User exit . If i do a Commit Work inside the FM does it release all the data base locks set by the standard transaction ? I was worried that the data base may be updated by that commit work inside my FM. How does this work? Please share your views.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 15:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871665#M49965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T15:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871666#M49966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi harikrishnan balan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, if you do a COMMIT WORK inside your userexit you will potentially cause data to be updated and ENQUEUE locks to be freed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much better, is to perform your updates by calling a another Z function module which performs the actual SQL INSERT/UPDATE/DELETE statements in UPDATE TASK (you will need to change the function module attributes to do this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, if SAP decides that is going to do updates it will issue a COMMIT WORK and your function (and all the standard ones) will be executed together in the update task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only potential problem with this approach, is that if you need to perform updates and SAP doesn't detect any changes.  Normally you can overcome this by adding an extra field to one of the SAP tables (as an append structure) and always changing the value of this in your userexit (by changing the corresponding global data field) whenever you need to make sure SAP issues a COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the short answer is: DONT ISSUE A COMMIT WORK IN YOUR USEREXITS!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 15:22:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871666#M49966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T15:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871667#M49967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;   Thanks for the reply. I am actually trying to use the FM SO_OBJECT_SEND in my FM to send mails to external id. From 4.7 the mail send FM does not work unless i explicitly do a commit work. So the scenario is like this-In user exit i call a Z FM which calls SO_OBJECT_SEND.But to get this to work i need to do a commit work.Is there any other solution to this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 15:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871667#M49967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T15:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871668#M49968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which SAP transaction and which userexit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 15:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871668#M49968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T15:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871669#M49969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;  It is for VA01,02 transactions user exit USEREXIT_SAVE_DOCUMENT in include MV45AFZZ. Can i do a call function on commit so that my FM gets called after SAP does a commit work and it will be safe to do a database commit after that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 16:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871669#M49969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T16:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871670#M49970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could do this using a PERFORM ... ON COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it should work just by having the call to SO_OBJECT_SEND in the USEREXIT_SAVE_DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because SAP will issue a COMMIT WORK in its own save logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 16:28:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871670#M49970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T16:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871671#M49971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;  No , this is not working. The mails are not getting sent. That is why i was wondering if i will do a call function on commit and then do an Explicit commit work in my Z FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:18:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871671#M49971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871672#M49972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the user-exit form USEREXIT_SAVE_DOCUMENT is called before commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to try commit work then use USEREXIT_REFRESH_DOCUMENT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Samir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871672#M49972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871673#M49973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no such thing as call function on commit.  There is call function in update task and there is perform on commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT, neither of these two options allow you to perform your own COMMIT WORK inside them.  This will cause an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try a test for me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leave your code without a COMMIT WORK in it, and the function call to send the email in USEREXIT_SAVE_DOCUMENT.  Then change a document in VA02 by changing a quantity or a text, something that will force SAP to issue a COMMIT WORK to make the changes update on the database, then hit save.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that works, then I have a method for making sure it works even if the user doesn't change anything and hits save (if you need to).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't there is something else to try...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Brad Williams&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:30:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871673#M49973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871674#M49974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Samir,&lt;/P&gt;&lt;P&gt;   If i am using call function on commit does the place where i call the FM make a difference? Wont my FM be executed once SAP does a data base commit in the standard code? And i think after that i may safely use a commit statement in my code. Please correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871674#M49974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871675#M49975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like you want to send an email out to someone upon saving the sales order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you try the output determination mechanism instead of user exit? It will pretty standard and easy doing it in config rather than trying it this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871675#M49975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871676#M49976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srini,&lt;/P&gt;&lt;P&gt;   The mail has to be sent when some one changes the sold to for the order to notify the change. So we cant use output determination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 17:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871676#M49976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T17:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871677#M49977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both Samir and Srinivas raise good points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But first, again there is no CALL TRANSACTION on COMMIT.  And, with PERFORM ... ON COMMIT you cannot issue another COMMIT WORK, its not allowed!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Samir's suggestion of putting it at USEREXIT_REFRESH_DOCUMENT would work.  You could then issue your own COMMIT WORK in this.  This is probably the simplest solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srivivas's suggestion would also work.  You just need to do two things.  Make the output type 'Multiple Issuing' in SPRO and put a requirement (coded in VOFM) against it checking that the sold-to party has been changed.  This would take a little more work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It still puzzles me why it would not work in USEREXIT_SAVE_DOCUMENT, but short of doing the coding myself and getting it to work I would recommend doing it in USEREXIT_REFRESH_DOCUMENT.&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>Mon, 09 May 2005 19:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871677#M49977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T19:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871678#M49978</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;   Thanks for your replies. We have nailed the problem. Actually it was something else. SO_OBJECT_SEND has a parameter ORIGINATOR where we can pass the sender ID. This was being populated from a table that was not maintained properly and although the sy-subrc was 0 after the function call , due to a junk value in this parameter the mails were not being sent. Thanks again for all the responses.From 4.7 commit work have to be added after call to this FM. But as it being done in the standard code we do not have to code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2005 20:26:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871678#M49978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-09T20:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871679#M49979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wasn't going crazy after all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to see that you got it going.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please close off the thread.&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, 10 May 2005 07:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/871679#M49979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-10T07:06:14Z</dc:date>
    </item>
  </channel>
</rss>

