<?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: Problem with database update using WAIT UP TO 30 SECONDS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755302#M903436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you use BAPI_TRANSACTION_COMMIT to commit the changes. Try this if not used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you can try to lock the order in a DO loop with a wait of say 1 second in every loop pass. If the locking is successful, unlock the order and exit the loop. (This locking can happen only when the order is created in the database and hence this logic). Make sure that you have an upper limit of say 30 times for your loop so that it doesnt get caught in an indefinite loop in the event the order is not commited properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looping actually gives you an option to keep your wait time varaible with maximum wait time going for exceptional cases alone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2008 02:23:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-08T02:23:00Z</dc:date>
    <item>
      <title>Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755300#M903434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am using this FM BAPI_PROCORDCONF_CREATE_HDR to confirm my process order... but it seems to work intermittently, it sometimes confirm sometimes it skips this process and do not confirm....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Through debugging, it is doing well... it confirms the process order... however upon running the program, it works intermittently...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our system is ECC 6.0... my suspect is that the ECC 6.0 runs faster than the older version hence having this problem with timing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used WAIT UP TO 30 SECONDS after the commit work... but it seems that this is not enough time yet for the system to update the database... i am afraid that extending only the time to wait in order to update the database would cause some risks for the program... to work intermittently...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your suggestion to make this work independent of time to wait for the system to update the DB...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:14:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755300#M903434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T02:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755301#M903435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = vl_ccode
asset = vl_asset
subnumber = vl_sub
generaldata = stl_generaldata
generaldatax = stl_generaldatax
importing
return = st_return.

call function 'BAPI_TRANSACTION_COMMIT'
wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755301#M903435</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-05-08T02:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755302#M903436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you use BAPI_TRANSACTION_COMMIT to commit the changes. Try this if not used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you can try to lock the order in a DO loop with a wait of say 1 second in every loop pass. If the locking is successful, unlock the order and exit the loop. (This locking can happen only when the order is created in the database and hence this logic). Make sure that you have an upper limit of say 30 times for your loop so that it doesnt get caught in an indefinite loop in the event the order is not commited properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looping actually gives you an option to keep your wait time varaible with maximum wait time going for exceptional cases alone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755302#M903436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T02:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755303#M903437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your prompt response jackandjay...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i actually use this after the bapi procordconfirm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;wait = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after this bapi transaction commit i put my wait up to 30 seconds... it seems not to work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755303#M903437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T02:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755304#M903438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am interested with your solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide sample code for this locking in a DO loop please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:38:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755304#M903438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T02:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755305#M903439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not have SAP access right now. The code will be of this sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE V_MAXCOUNT &amp;lt; 30.&lt;/P&gt;&lt;P&gt;   CALL FUNCTION &amp;lt;your enqueue module&amp;gt; here. " Get the enqueue module for the order table that   corresponds to your order type. Here you can pass the order number generated, that is obtained as a result of your BAPI&lt;/P&gt;&lt;P&gt;   if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;      call function &amp;lt;your dequeue module here&amp;gt;&lt;/P&gt;&lt;P&gt;      EXIT. " You need not loop any further&lt;/P&gt;&lt;P&gt;   else.&lt;/P&gt;&lt;P&gt;     wait for 1 seconds.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;   V_MAXCOUNT = V_MAXCOUNT + 1.&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;clear V_MAXCOUNT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 02:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755305#M903439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T02:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755306#M903440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One last question... How will I know the enqueue and dequeue module that I'll be using...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 03:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755306#M903440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T03:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with database update using WAIT UP TO 30 SECONDS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755307#M903441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figure out which database table holds your order created, say AUFK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this the lock object is ESORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go inside this lock object in SE11.&lt;/P&gt;&lt;P&gt;Now look for "Lock Modules" in the GoTo Menu (I am not sure - pls check in the system)&lt;/P&gt;&lt;P&gt;This will give both Enqueue and Dequeue modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 03:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-database-update-using-wait-up-to-30-seconds/m-p/3755307#M903441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T03:24:17Z</dc:date>
    </item>
  </channel>
</rss>

