<?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: wait statement... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038452#M1350481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;  he is creating and updating the same material using bdc. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; that statement accours after creation of material and before the updation of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if he is updating or creating a material... you check if the change has reflected in the DB table using:  select single matnr from mara where matnr = itab_data-matnr. if sy-subrc eq 0.. then proceeed furture.. use this in a DO ENDDO.. so exit once the sy-subrc from the select is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO.
select single matnr from mara where matnr = itab_data-matnr.
if sy-subrc eq 0. " this would be 0 only if the update has occured.. 
exit.
endif.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Aug 2009 21:03:01 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2009-08-08T21:03:01Z</dc:date>
    <item>
      <title>wait statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038448#M1350477</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; WAIT UP TO 10 SECONDS. is used in one of the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as suggested by SAP we should not use the WAIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the replacement statement for the WAIT statement.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I understood from the documentation of the program, that statement is using because he is creating and updating the same material using bdc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that statement accours after creation of material and before the updation of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give me the correct replacement statement for  WAIT UP TO 1 SECONDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 12:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038448#M1350477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T12:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: wait statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038449#M1350478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Use COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the BDC use 'S' for synchronous update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ankur Parab on Aug 8, 2009 6:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 12:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038449#M1350478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: wait statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038450#M1350479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sunny,&lt;/P&gt;&lt;P&gt;just to add some points to what ankur has suggested:&lt;/P&gt;&lt;P&gt;your program is having that WAIT FOR 10 SECONDS because they might be reading or handling the data  after the data is being updated in the database table, and to pass the value actually to data base actually need a commit work. which can either triggered with a COMMIT WORK statement or a completion of LUW (Logical Unit of Work). and this update needs some seconds some time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in place of using wait for 10 secs you can use COMMIT WORK and WAIT as suggested by Ankur too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 14:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038450#M1350479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T14:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: wait statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038451#M1350480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Commit work and wait is one way .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Just to be sure of the updation of data in database, you can use a manual lock CODE as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  Do .
  ***Following select is just an example.Change acc to ur requirement.
  Select Matnr
    from mara
   ...............................

   if sy-subrc = 0.
     EXIT.
   endif.
  Enddo.

  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 16:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038451#M1350480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: wait statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038452#M1350481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;  he is creating and updating the same material using bdc. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; that statement accours after creation of material and before the updation of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if he is updating or creating a material... you check if the change has reflected in the DB table using:  select single matnr from mara where matnr = itab_data-matnr. if sy-subrc eq 0.. then proceeed furture.. use this in a DO ENDDO.. so exit once the sy-subrc from the select is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO.
select single matnr from mara where matnr = itab_data-matnr.
if sy-subrc eq 0. " this would be 0 only if the update has occured.. 
exit.
endif.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 21:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-statement/m-p/6038452#M1350481</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-08-08T21:03:01Z</dc:date>
    </item>
  </channel>
</rss>

