<?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 and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765766#M644099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kokwei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same problem was faced by me once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If time is not the major factor in your report.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using wait command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg : WAIT UP TO '2' SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or any seconds.  Try doing it to the minimum time possible and use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function module also try using some value instead of X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = '7'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = it_messages2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely it will work.  Let me know if it does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gowri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Gowri Shankar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2007 12:02:38 GMT</pubDate>
    <dc:creator>former_member873340</dc:creator>
    <dc:date>2007-09-14T12:02:38Z</dc:date>
    <item>
      <title>commit work and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765764#M644097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a BAPI called, i do commit work and wait, or     &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'. &lt;/P&gt;&lt;P&gt;For both, it return "XXXX is still processed by user XXXX".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This shows that the second loop of job is starting even the first job havent completed the update.   i have tried   commit work and wait, or bapi_transaction_commit with wait = 'X' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works in Debug mode, when I stop break on the line BAPI_TRANSACTION_COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to do this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are my codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;       entrysheetheader = l_entrysheetheader&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;       entrysheet       = v_entrysheet&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;       return           = it_messages .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              wait   = 'X'&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              return = it_messages2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 11:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765764#M644097</guid>
      <dc:creator>kowong</dc:creator>
      <dc:date>2007-09-14T11:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: commit work and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765765#M644098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to set the update as local, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET UPDATE TASK LOCAL. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 11:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765765#M644098</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-09-14T11:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: commit work and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765766#M644099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kokwei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same problem was faced by me once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If time is not the major factor in your report.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using wait command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg : WAIT UP TO '2' SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or any seconds.  Try doing it to the minimum time possible and use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the function module also try using some value instead of X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = '7'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = it_messages2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely it will work.  Let me know if it does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gowri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Gowri Shankar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 12:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765766#M644099</guid>
      <dc:creator>former_member873340</dc:creator>
      <dc:date>2007-09-14T12:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: commit work and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765767#M644100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can wait using FMCT_WAIT_FOR_UPDATE function module or WAIT instruction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 12:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765767#M644100</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-09-14T12:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: commit work and wait  OR     'BAPI_TRANSACTION_COMMIT'  doesnt work..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765768#M644101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could debug this message and see if it is being issued based on an enqueue wait for some object.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you could check this in your program before doing the commit and loop till it is available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2007 13:14:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-and-wait-or-bapi-transaction-commit-doesnt-work/m-p/2765768#M644101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-14T13:14:51Z</dc:date>
    </item>
  </channel>
</rss>

