<?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: Program completion before database commit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564520#M1659374</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;Try the following command before looking for info records in the database..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;WAIT UP TO 2 SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesnt work.. then i feel you should split the program... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st create all info records..capture the success/error messages.. once done&lt;/P&gt;&lt;P&gt;call the 2nd part which is related to validation of info record in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 17:12:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-08T17:12:56Z</dc:date>
    <item>
      <title>Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564519#M1659373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;I am doing a mass update using batch input program. The issue is that my program completes before actual database commit.My requirement is to create info records and after calling the standard batch input program , i am checking  the standard tables if the info record is created or not. If yes, am updating the numnbeer else am updating an error message,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that for some 200 odd records there is no issue but if the no of records exceeds say 1000 or more, the background process of batch input program continues and then my code to check if the info record is created gets called. At this time,the database is still getting updated and there is no info record getting filled( info record actually gets  updated in the standard tbale after few mins). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure this is to do with database commit issue and can actually use wait statement but then i cannot always expliciltly say wait up to 100 seconds because the user can choose 1000 records or 1 record at a time. How to ensure that the database gets updated before my checking of the info record in the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 16:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564519#M1659373</guid>
      <dc:creator>former_member182337</dc:creator>
      <dc:date>2012-02-08T16:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564520#M1659374</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;Try the following command before looking for info records in the database..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;WAIT UP TO 2 SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesnt work.. then i feel you should split the program... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st create all info records..capture the success/error messages.. once done&lt;/P&gt;&lt;P&gt;call the 2nd part which is related to validation of info record in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 17:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564520#M1659374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T17:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564521#M1659375</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;u can use commit keyword for ur purpose&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;chaitanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 17:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564521#M1659375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T17:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564522#M1659376</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;I have tried with commit statement and also commit work and wait but still before the database update the select query is called and the output is that no data exist in the internal table. Are there any solution to fix this without having to modify the program or split the program into two? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program is working as expected except for this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 17:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564522#M1659376</guid>
      <dc:creator>former_member182337</dc:creator>
      <dc:date>2012-02-08T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564523#M1659377</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;Put your code in a FM..in FM attributes declare it as Update FM..&lt;/P&gt;&lt;P&gt;Now in place of your code, call this FM in update task.&lt;/P&gt;&lt;P&gt;In this way, it will be called after the Commit.&lt;/P&gt;&lt;P&gt;Your problem will be solved.&lt;/P&gt;&lt;P&gt;Please revert for any queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Bansal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 18:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564523#M1659377</guid>
      <dc:creator>Harsh_Bansal</dc:creator>
      <dc:date>2012-02-08T18:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Program completion before database commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564524#M1659378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all. Your answers were helpful. I used while endwhile to fix this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 01:08:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-completion-before-database-commit/m-p/8564524#M1659378</guid>
      <dc:creator>former_member182337</dc:creator>
      <dc:date>2012-02-17T01:08:07Z</dc:date>
    </item>
  </channel>
</rss>

