<?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 COMMIT within a User-exit or BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691700#M1102777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you try increasing the wait time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commit work and wait X seconds.  X?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2008 15:24:40 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-11-05T15:24:40Z</dc:date>
    <item>
      <title>How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691695#M1102772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scenario:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;User-exit called from SAP transaction.&lt;/P&gt;&lt;P&gt;It needs to update Z*table and then do standard Sap processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Whats it doing:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However when I run it, I realise that it is not updating the Z*table.&lt;/P&gt;&lt;P&gt;I tried to introduce a wait statement and then sometimes it does commit data to Z*table and sometimes it doesnt.(NO error returned. Sy-subrc = 0. However if I use a COMMIT statement, the program gives runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I need:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a way how I can make sure that data is written to Z* table first and only then is the stanadrd SAP processing done. (as mentioned writing a COMMIT staement is not helping...so how do I commit data to Z*table before going ahead in same transaction? )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your response on same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Shirin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691695#M1102772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T15:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691696#M1102773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;if the Ztable needs to be updated you will be using Modify , Insert statments... the structure of the work area and Ztable need to be same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691696#M1102773</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-11-05T15:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691697#M1102774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You probably have you write a function module (remote enable it ) that updates the Z table and then call that function module with destination 'NONE'. (write a commit work after the z table update )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this would work but the documentation says &lt;/P&gt;&lt;P&gt;Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you cannot use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691697#M1102774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T15:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691698#M1102775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For updating Z-tables in user exits I usually call a subroutine with PERFORM ... ON COMMIT. This way your code is being executed once the standard transaction sends a COMMIT WORK. This will update the Z-table immediatly after the standard tables.&lt;/P&gt;&lt;P&gt;I don't think it is possible to have the Z-table updated &lt;EM&gt;before&lt;/EM&gt; the standard tables though. What would be a reason that this might be mandatory?&lt;/P&gt;&lt;P&gt;Never invoke a COMMIT WORK directly in your user exit.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691698#M1102775</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-11-05T15:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691699#M1102776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess you did not get my question. Let me give some more details &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using an UPDATE statement withing the exit. (work area structure is same as that of z*table).&lt;/P&gt;&lt;P&gt;Update statement executes fine (sy-subrc = 0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once this is done, I let SAP continue with standard processing. When I check the results, SAP standard processing has worked fine but Z*table is not updated. So I introduced WAIT statement after my UPDATE statem,ent and it works fine if the no of records is upto 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything after 10 records, the results are not predictable. In some cases it updates and sometimes doesnt.&lt;/P&gt;&lt;P&gt;( I read some threads and they talk about COMMIT statement. However I can not use that with the user-exit...it errors).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am trying to find a way, how to make sure that Z*table is updated and then only stnadrd SAP processing resumes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shirin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:22:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691699#M1102776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691700#M1102777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you try increasing the wait time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commit work and wait X seconds.  X?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691700#M1102777</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-11-05T15:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691701#M1102778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write your update code in a function module and call the function module in STARTING A NEW TASK mode and within function module give commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 15:44:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691701#M1102778</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-11-05T15:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to COMMIT within a User-exit or BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691702#M1102779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thomas,&lt;/P&gt;&lt;P&gt;can youplease let explain why we should not call commit inside badi ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex : inside badi impl:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Select * from ZCUSTOM into table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Read Table ITAB into WA_ITAB with key&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;WA_ITAB - Delivered_Quantity = WA_ITAB - Delivered_Quantity + Input_Delivered_quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Modify table ITAB from WA_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;If NOT ITAB[] IS INITIAL.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; MODIFY ZCUSTOM from ITAB.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt; commit work.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;endif.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;can we use this or please tell the alternate for this .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 17:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-commit-within-a-user-exit-or-badi/m-p/4691702#M1102779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-10-09T17:18:31Z</dc:date>
    </item>
  </channel>
</rss>

