<?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: How to delay a certain ABAP statement. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653956#M290305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try changing your COMMIT WORK to COMMIT WORK AND WAIT.  This waits until the commit is complete before continuing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Nov 2006 20:46:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-22T20:46:09Z</dc:date>
    <item>
      <title>How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653948#M290297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi exps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the scenario..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three lines of code....&lt;/P&gt;&lt;P&gt;1. first line abap statement.&lt;/P&gt;&lt;P&gt;2. second line abap statement.&lt;/P&gt;&lt;P&gt;3. third line abap statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;Is it possible to delay the execution of Second line untill the execution of THIRD line is complete...without changing the position of them.&lt;/P&gt;&lt;P&gt;Will WAIT UP TO x SECONDS work for this. I think it will delay all the succeeding statements.am i right  or not...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solution...pls.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 14:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653948#M290297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T14:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653949#M290298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT YDELAY.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This program delays n seconds&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TIM LIKE SY-UZEIT, N TYPE I VALUE 30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIM = SY-UZEIT.&lt;/P&gt;&lt;P&gt;TIM = TIM + N.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;  GET TIME.&lt;/P&gt;&lt;P&gt;  IF TIM &amp;lt; SY-UZEIT.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 14:59:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653949#M290298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T14:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653950#M290299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;U r right..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WAIT UP TO x SECONDS will delay the excution of succeding statements..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs&lt;/P&gt;&lt;P&gt;Manas Ranjan Panda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 15:00:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653950#M290299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T15:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653951#M290300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saravanan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its not possible to execute the third line of a stament without executing the second one, because the ABAP compiler executes line after line. In this case, you should change the flow logic of your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reward any helpful answer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 15:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653951#M290300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T15:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653952#M290301</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 x SECONDS will delay all the succeeding statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;PERFORM n OF form1 form2 form3 ... .&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Effect&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; Calls the subroutine with the index n from the list of subroutines in the statement. At runtime, n must contain a value between 1 (first name) and the total number of subroutines listed in the PERFORM statement (last name). The list can contain up to 256 subroutines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else, you can write &amp;lt;b&amp;gt;PERFORM form ON COMMIT&amp;lt;/b&amp;gt;. fro second one,  and execute this after the 3rd one comeplte the process&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 15:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653952#M290301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T15:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653953#M290302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can check in the debugger, second line is executed after first line.&lt;/P&gt;&lt;P&gt;Howver if you have statments, which trigger update process, it will happen in the background, so it might still run, when your second statement is executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try 'SET UPDATE TASK LOCAL.' and 'COMMIT WORK AND WAIT.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this example to process idocs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      SET UPDATE TASK LOCAL.

      CALL FUNCTION 'EDI_DATA_INCOMING'
           EXPORTING
                pathname = l_pathname
                port     = port
           EXCEPTIONS
                OTHERS   = 1.

      IF sy-subrc = 0.

        COMMIT WORK AND WAIT.

        FORMAT COLOR COL_POSITIVE.
        WRITE: / sy-vline, &amp;lt;fs_dir_list&amp;gt;-name,
        'Inbound processing was called, check the generated IDoc.'(l00),
                   AT sy-linsz sy-vline.
        ULINE.
      ELSE.
        FORMAT COLOR COL_NEGATIVE.
        WRITE: / sy-vline, &amp;lt;fs_dir_list&amp;gt;-name,
        'Error in inbound processing'(l03),
                   AT sy-linsz sy-vline.
      ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 15:43:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653953#M290302</guid>
      <dc:creator>Peter_Inotai</dc:creator>
      <dc:date>2006-11-22T15:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653954#M290303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to &amp;lt;b&amp;gt;delay the execution of Second line untill the execution of THIRD line is complete&amp;lt;/b&amp;gt;...without changing the position of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--- From the above do you mean that, you need to execute 3rd line before 2nd line, is it???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 15:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653954#M290303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T15:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653955#M290304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi easwar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what u have grasped is exactly correct. &lt;/P&gt;&lt;P&gt;It may look funny.but my situation wants this.&lt;/P&gt;&lt;P&gt;ie, my badi method is executing before the full database update is done (commit work).&lt;/P&gt;&lt;P&gt;But i want this the other way.&lt;/P&gt;&lt;P&gt;ie, my code in the badi method is to be executed after the commit work.(after ful database update)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think now u understood the real problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;solution pls.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 16:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653955#M290304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T16:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653956#M290305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try changing your COMMIT WORK to COMMIT WORK AND WAIT.  This waits until the commit is complete before continuing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 20:46:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653956#M290305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T20:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653957#M290306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls. try with below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. first line abap statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   in second line write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. PERFORM Subroutine_name  ON COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. third line abap statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; here you write second ABAP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;Now after performing third statement, at the time commit of the program it will go to the perform statement and process the secon statemnet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward points if it is useful answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 05:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653957#M290306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T05:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653958#M290307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saravanan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding, the approach you have taken might be wrong. Flow of a program/code in ABAP/SAP doesnt work that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can expect better solutions if you can provide inputs on the actual requirement. I beleive knowing the exact requirement can lead to other alternative methods if any...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 06:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653958#M290307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T06:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to delay a certain ABAP statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653959#M290308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saravanan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can call a function module &amp;lt;b&amp;gt;in update task&amp;lt;/b&amp;gt; inside your badi's code. In that way, all the code within the function module will be executed after a commit work is executed. I remember the new function module should have Update module flag and Start delayed flag checked in its attributes tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could maybe work. Good luck!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indegheto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 12:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delay-a-certain-abap-statement/m-p/1653959#M290308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T12:06:13Z</dc:date>
    </item>
  </channel>
</rss>

