<?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: Events Triggered in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141029#M114586</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;See my example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEVENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;WRITE: / 'INITIALIZATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'START-OF-SELECTION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'END-OF-SELECTION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;WRITE: / 'TOP-OF-PAGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; INITIALIZATION: it's triggered as soon as the program is loaded to be ran. So it's always the first event is triggered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; TOP-OF-PAGE: it's triggered as soon as a command to write something in the ABAP list is called. So it depends on where these command are called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; START-OF-SELECTION: it's the main part of the program, here there are all actions ahve to be run, it's triggered only if the user press F8 or F9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; END-OF-SELECTION: it's the end of program and triggere as soon as START-OF-SELECTION event ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the output of my example will be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;INITIALIZATION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION&lt;/P&gt;&lt;P&gt;END-OF-SELECTION&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;INITIALIZATION event is triggered and command WRITE is called, so TOP-OF-PAGE event is triggered, them the program back to INITIALIZATION and run START-OF-SELECTION and END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jan 2006 11:27:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-08T11:27:38Z</dc:date>
    <item>
      <title>Events Triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141026#M114583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi  &lt;/P&gt;&lt;P&gt;guys i am not understand why the out put is 1,2,99.&lt;/P&gt;&lt;P&gt; please explain me &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Events Triggered in the Order Dictated by the Driver Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1  report ztx1702.&lt;/P&gt;&lt;P&gt;2  data f1 type i value 1.&lt;/P&gt;&lt;P&gt;3 &lt;/P&gt;&lt;P&gt;4  end-of-selection.&lt;/P&gt;&lt;P&gt;5    write: / '3.  f1 =', f1.&lt;/P&gt;&lt;P&gt;6 &lt;/P&gt;&lt;P&gt;7  start-of-selection.&lt;/P&gt;&lt;P&gt;8    write: / '2.  f1 =', f1.&lt;/P&gt;&lt;P&gt;9    f1 = 99.&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;11 initialization.&lt;/P&gt;&lt;P&gt;12   write: / '1.  f1 =', f1.&lt;/P&gt;&lt;P&gt;13   add 1 to f1.&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;&lt;/P&gt;&lt;P&gt;output: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  f1 =          1 &lt;/P&gt;&lt;P&gt;2.  f1 =          2 &lt;/P&gt;&lt;P&gt;3.  f1 =         99&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2006 08:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141026#M114583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-08T08:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Events Triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141027#M114584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order of events triggered in ABAP programming is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;#149;	INITIALIZATION
&amp;#149;	AT SELECTION-SCREEN
&amp;#149;	AT SELECTION-SCREEN ON &amp;lt;field&amp;gt; 
&amp;#149;	START-OF-SELECTION
&amp;#149;	TOP-OF-PAGE
&amp;#149;	END-OF-PAGE
&amp;#149;	END-OF-SELECTION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP program will be executed in the above event order, with out depending on the order you write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program execution will be like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) It declares the f1 as the integer type value and initializes 1 to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) It directly goes to the Intialization part and there you are printing f1 value which is 1.&lt;/P&gt;&lt;P&gt; So there the output will be 1.f1 = 1.&lt;/P&gt;&lt;P&gt; At step 13 It will add 1 to f1. so here your f1 value is 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) It then goes to the Start-of-selection event.&lt;/P&gt;&lt;P&gt;   Here you are again printing f1 value which is 2.&lt;/P&gt;&lt;P&gt;   after printing f1 value you are assigning 99 to f1 so your f1 now becomes to 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) It goes to End-of-selection part and again you are printing f1 value which is 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your report output willbe like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.f1 = 1.&lt;/P&gt;&lt;P&gt;2.f1 = 2.&lt;/P&gt;&lt;P&gt;3.f1 = 99.&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;Sreekanth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sreekanth G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sreekanth G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2006 09:39:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141027#M114584</guid>
      <dc:creator>sreekanthgo</dc:creator>
      <dc:date>2006-01-08T09:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Events Triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141028#M114585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please reward some points... if my answer was helpful to you..&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;Sreekanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2006 10:18:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141028#M114585</guid>
      <dc:creator>sreekanthgo</dc:creator>
      <dc:date>2006-01-08T10:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Events Triggered</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141029#M114586</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;See my example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEVENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;WRITE: / 'INITIALIZATION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'START-OF-SELECTION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: / 'END-OF-SELECTION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;WRITE: / 'TOP-OF-PAGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; INITIALIZATION: it's triggered as soon as the program is loaded to be ran. So it's always the first event is triggered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; TOP-OF-PAGE: it's triggered as soon as a command to write something in the ABAP list is called. So it depends on where these command are called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; START-OF-SELECTION: it's the main part of the program, here there are all actions ahve to be run, it's triggered only if the user press F8 or F9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&amp;gt; END-OF-SELECTION: it's the end of program and triggere as soon as START-OF-SELECTION event ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the output of my example will be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;INITIALIZATION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION&lt;/P&gt;&lt;P&gt;END-OF-SELECTION&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;INITIALIZATION event is triggered and command WRITE is called, so TOP-OF-PAGE event is triggered, them the program back to INITIALIZATION and run START-OF-SELECTION and END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2006 11:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-triggered/m-p/1141029#M114586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-08T11:27:38Z</dc:date>
    </item>
  </channel>
</rss>

