<?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 Commit in modified DB tables: howto? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339303#M1397258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all @ SAP forums,&lt;/P&gt;&lt;P&gt;I experienced a strange behaviour on an SRM machine... kinda be an ABAP question, that's why I'm asking here.&lt;/P&gt;&lt;P&gt;Basically: I execute some FM calls that lead to the creation of a new Purchase Order. This implies that some data are written into DB tables, and that's the point. Consider this stack in pseudocode:&lt;/P&gt;&lt;P&gt;- create the order;&lt;/P&gt;&lt;P&gt;- update the order;&lt;/P&gt;&lt;P&gt;- save the order;&lt;/P&gt;&lt;P&gt;- COMMIT WORK;&lt;/P&gt;&lt;P&gt;- (*);&lt;/P&gt;&lt;P&gt;- go searching for an entry in a DB table (BBP_PDBEI); it SHOULD be present since it is create during the PO update phase (SELECT SINGLE * FROM BBP_PDBEI INTO WA_BBP_PDBEI WHERE GUID = item-GUID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well; often the search returns no result (sy-subrc =4), even though I can see after the execution that the entry exists in BBP_PDBEI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the point: if I insert a WAIT UP TO 10 SECONDS in the place marked with (*), then the entry is found. Sounds like a short amount of time is necessary to commit that DB table... could it be?&lt;/P&gt;&lt;P&gt;And in this case, since the complexity of the PO currently created cannot allow to predict a time-to-commit, how can I be sure that the SELECT statement is executed in a consistent and up-to-date DB table?&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2009 14:12:33 GMT</pubDate>
    <dc:creator>matteo_montalto</dc:creator>
    <dc:date>2009-11-02T14:12:33Z</dc:date>
    <item>
      <title>Commit in modified DB tables: howto?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339303#M1397258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all @ SAP forums,&lt;/P&gt;&lt;P&gt;I experienced a strange behaviour on an SRM machine... kinda be an ABAP question, that's why I'm asking here.&lt;/P&gt;&lt;P&gt;Basically: I execute some FM calls that lead to the creation of a new Purchase Order. This implies that some data are written into DB tables, and that's the point. Consider this stack in pseudocode:&lt;/P&gt;&lt;P&gt;- create the order;&lt;/P&gt;&lt;P&gt;- update the order;&lt;/P&gt;&lt;P&gt;- save the order;&lt;/P&gt;&lt;P&gt;- COMMIT WORK;&lt;/P&gt;&lt;P&gt;- (*);&lt;/P&gt;&lt;P&gt;- go searching for an entry in a DB table (BBP_PDBEI); it SHOULD be present since it is create during the PO update phase (SELECT SINGLE * FROM BBP_PDBEI INTO WA_BBP_PDBEI WHERE GUID = item-GUID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well; often the search returns no result (sy-subrc =4), even though I can see after the execution that the entry exists in BBP_PDBEI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the point: if I insert a WAIT UP TO 10 SECONDS in the place marked with (*), then the entry is found. Sounds like a short amount of time is necessary to commit that DB table... could it be?&lt;/P&gt;&lt;P&gt;And in this case, since the complexity of the PO currently created cannot allow to predict a time-to-commit, how can I be sure that the SELECT statement is executed in a consistent and up-to-date DB table?&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 14:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339303#M1397258</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2009-11-02T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in modified DB tables: howto?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339304#M1397259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without knowing the exact setting and whether/how you are registering the FMs as update tasks,  I recommend you try the COMMIT WORK AND WAIT statement to ensure synchronous processing.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 14:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339304#M1397259</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-11-02T14:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in modified DB tables: howto?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339305#M1397260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas, I'm gonna trying it rite now... How does it work? Will it work for complete commit even in update task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 14:22:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339305#M1397260</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2009-11-02T14:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in modified DB tables: howto?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339306#M1397261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here some additional info from ABAP documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm" target="test_blank"&gt;http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like this is what you want here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 14:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339306#M1397261</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-11-02T14:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in modified DB tables: howto?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339307#M1397262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks mate... I'll re-open the thread again in case of problems, but as far as I've seen now it seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 14:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-modified-db-tables-howto/m-p/6339307#M1397262</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2009-11-02T14:35:02Z</dc:date>
    </item>
  </channel>
</rss>

