<?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 define event in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390117#M814017</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;where i can define event and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 10:01:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-18T10:01:21Z</dc:date>
    <item>
      <title>define event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390117#M814017</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;where i can define event and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:01:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390117#M814017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: define event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390118#M814018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EVENTS&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;ABAP program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pa_date = pa_date - 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE pa_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest events to understand are those for an executable program (type 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP runtime system calls event blocks in a sequence designed for generating and processing&lt;/P&gt;&lt;P&gt;lists:&lt;/P&gt;&lt;P&gt;First, the INITIALIZATION event block is called&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then a selection screen is sent to the presentation server&lt;/P&gt;&lt;P&gt;After the user leaves the selection screen, START-OF-SELECTION is called&lt;/P&gt;&lt;P&gt;If the START-OF-SELECTION event block contains the ABAP statements WRITE, SKIP or ULINE,&lt;/P&gt;&lt;P&gt;a list buffer is filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event Blocks in Executable Programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default event block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event blocks are processing blocks that are called by the ABAP runtime system. The sequence if which&lt;/P&gt;&lt;P&gt;they are processed is determined by the runtime system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In executable programs, there are different event blocks for the various tasks involved in creating lists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax: Event Blocks&lt;/P&gt;&lt;P&gt;REPORT ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: pa_date LIKE sy-datum DEFAULT sy-datum.&lt;/P&gt;&lt;P&gt;INITIALIZATION.                                      " Default values for selection screen&lt;/P&gt;&lt;P&gt;pa_date = pa_date - 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.  &lt;/P&gt;&lt;P&gt;                                                     " Start of data processing&lt;/P&gt;&lt;P&gt;WRITE pa_date.&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;The sequence of event blocks in the&lt;/P&gt;&lt;P&gt;source code has no effect on the sequence in&lt;/P&gt;&lt;P&gt;which they are called by the ABAP runtime system.&lt;/P&gt;&lt;P&gt;call&lt;/P&gt;&lt;P&gt;initialization&lt;/P&gt;&lt;P&gt;START&lt;DEL&gt;OF&lt;/DEL&gt;SELECTION..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an ABAP program, an event block is introduced with an event key word. It ends when the next&lt;/P&gt;&lt;P&gt;processing block starts. There is no ABAP statement that explicitly concludes an event block.&lt;/P&gt;&lt;P&gt;Event blocks are called by the ABAP runtime system. The order in which you arrange the event blocks in&lt;/P&gt;&lt;P&gt;your program is irrelevant - the system always calls them in a particular order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION is the first event for processing data and generating a list. It is called by the&lt;/P&gt;&lt;P&gt;ABAP runtime system as soon as you have left the standard selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION is an event that you can use if you need to set a large number of default values. This&lt;/P&gt;&lt;P&gt;event block allows you to set default values that can only be determined at runtime. In the above&lt;/P&gt;&lt;P&gt;example, the date 'A week ago' is calculated and placed in data object pa_date. The ABAP runtime&lt;/P&gt;&lt;P&gt;system then sends a selection screen to the presentation server containing the calculated value as a&lt;/P&gt;&lt;P&gt;default. The value can, of course, still be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection screen processing is event-driven. Events are ABAP processing blocks that are called by the&lt;/P&gt;&lt;P&gt;runtime system in a particular order and processed sequentially. In the program, each event is&lt;/P&gt;&lt;P&gt;introduced by an event keyword. The processing block ends when the next event block starts, or the&lt;/P&gt;&lt;P&gt;definition of a subroutine or dialog module occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT is processed before the selection screen is displayed on the&lt;/P&gt;&lt;P&gt;screen. You can use this event to modify the selection screen dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON HELP-REQUEST FOR &amp;lt;sel_field&amp;gt; and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR &amp;lt;sel_field&amp;gt; allow you to define your own F1&lt;/P&gt;&lt;P&gt;and F4 help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN is processed when the user presses ENTER or chooses another function on&lt;/P&gt;&lt;P&gt;the selection screen.&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;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An ABAP program consists of a sequence of processing blocks (events) that are processed by the&lt;/P&gt;&lt;P&gt;runtime system in a particular order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD-OF-PROGRAM is triggered directly after the system has loaded a program with type 1, M, F, or S&lt;/P&gt;&lt;P&gt;into an internal session. The processing block is executed once only for each program in each internal&lt;/P&gt;&lt;P&gt;session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION is processed in executable (type 1) programs, directly before the selection screen is&lt;/P&gt;&lt;P&gt;displayed. You can use the corresponding processing block to pre-assign values to the parameters and&lt;/P&gt;&lt;P&gt;selection options on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION is processed after the selection screen has been processed. If you are&lt;/P&gt;&lt;P&gt;working with a logical database, the corresponding GET events are triggered after START-OFSELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION is processed after all of the data has been read, and before the list is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE is an event in list processing. The associated processing block is always executed when&lt;/P&gt;&lt;P&gt;you start a new page in the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;module pool&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET GET ...&lt;/P&gt;&lt;P&gt;You can only assign a report transaction to an executable (type 1) program. In a report transaction,&lt;/P&gt;&lt;P&gt;the system calls particular events in a fixed sequence, and calls a series of standard screens. The&lt;/P&gt;&lt;P&gt;following steps occur when you run a report transaction:&lt;/P&gt;&lt;P&gt;First, the LOAD-OF-PROGRAM event is triggered.&lt;/P&gt;&lt;P&gt;Then the INITIALIZATION event is triggered.&lt;/P&gt;&lt;P&gt;Next, the standard selection screen is called (if you have declared one), and its corresponding events&lt;/P&gt;&lt;P&gt;are triggered: AT SELECTION-SCREEN OUTPUT and AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;Next, the START-OF-SELECTION event is triggered. (This is the default event block. If you omit this&lt;/P&gt;&lt;P&gt;event keyword, all statements that are not assigned to another processing block are treated as though&lt;/P&gt;&lt;P&gt;they belong to it.)&lt;/P&gt;&lt;P&gt;If you have attached a logical database to your program, the system triggers the GET &amp;lt;node&amp;gt; and GET&lt;/P&gt;&lt;P&gt;&amp;lt;node&amp;gt; LATE events.&lt;/P&gt;&lt;P&gt;Then the END-OF-SELECTION event is triggered.&lt;/P&gt;&lt;P&gt;You can also include screen processing (as in module pools) by using the CALL SCREEN statement.&lt;/P&gt;&lt;P&gt;You can start executable (type 1) programs without using a transaction code. You can also run them in&lt;/P&gt;&lt;P&gt;the background.&lt;/P&gt;&lt;P&gt;(C) SAP AG BC402 2-11&lt;/P&gt;&lt;P&gt;SAP AG 1999&lt;/P&gt;&lt;P&gt;WRITE ...&lt;/P&gt;&lt;P&gt;SKIP ...&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;List Processing Events&lt;/P&gt;&lt;P&gt;TOP TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;EOP END-OF-PAGE.&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE ...&lt;/P&gt;&lt;P&gt;SKIP ...&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;ALS&lt;/P&gt;&lt;P&gt;List buffer for basic list&lt;/P&gt;&lt;P&gt;AUC AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;List buffer for detail list&lt;/P&gt;&lt;P&gt;If you fill the list buffer of the basic list (using the WRITE, SKIP, and ULINE statements), two further&lt;/P&gt;&lt;P&gt;events are triggered: At the beginning of each new page, the TOP-OF-PAGE event is triggered, and the&lt;/P&gt;&lt;P&gt;END-OF-PAGE event is triggered at the end of each page.&lt;/P&gt;&lt;P&gt;Once the END-OF-SELECTION event block has been processed, interactive list processing starts.&lt;/P&gt;&lt;P&gt;The system displays the formatted basic list . The user can now trigger further events.&lt;/P&gt;&lt;P&gt;If the user double-clicks a line or triggers the function code PICK in some other way, the AT LINESELECTION&lt;/P&gt;&lt;P&gt;event is triggered. In the standard list status, this function code is always assigned to&lt;/P&gt;&lt;P&gt;function key &amp;lt;F2&amp;gt;. In turn, &amp;lt;F2&amp;gt; is always assigned for a mouse double-click.&lt;/P&gt;&lt;P&gt;If you fill the list buffer of the detail list (of which you may have up to twenty) using the WRITE, SKIP,&lt;/P&gt;&lt;P&gt;and ULINE statements, two further events are triggered:&lt;/P&gt;&lt;P&gt;At the beginning of each new page, the TOP-OF-PAGE DURING LINE-SELECTION event is triggered,&lt;/P&gt;&lt;P&gt;and the END-OF-PAGE DURING LINE-SELECTION event is triggered at the end of each page. (These&lt;/P&gt;&lt;P&gt;events are not displayed in the graphic.) Interactive list processing is started again. The system&lt;/P&gt;&lt;P&gt;displays the formatted detail list (screen 120).&lt;/P&gt;&lt;P&gt;Any other function codes that have not been "trapped" by the system trigger the event AT USERCOMMAND.&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;STRONG&gt;DONT FORGET TO REWARD IF USEFUL&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:06:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390118#M814018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: define event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390119#M814019</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;Please see the link below for step by step procedure for creating events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://sapabapnotes.blogspot.com/|http://sapabapnotes.blogspot.com/]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:07:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390119#M814019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: define event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390120#M814020</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;When you run an executable program, the program flow is controlled by the external events in the ABAP runtime environment. The following diagram shows the sequence of the events: &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 &lt;/P&gt;&lt;P&gt; Before the standard selection screen is displayed&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN&lt;/P&gt;&lt;P&gt; After user input on a selection screen has been processed, but while the selection screen is still active &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START-OF-SELECTION &lt;/P&gt;&lt;P&gt; After the standard selection screen has been processed, before data is read from the logical database&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt; &lt;/P&gt;&lt;P&gt; After the logical database has read an entry from the node &amp;lt;table&amp;gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt; LATE &lt;/P&gt;&lt;P&gt; After all of the nodes of the logical database have been processed that are below &amp;lt;table&amp;gt; in the database hierarchy &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;END-OF-SELECTION &lt;/P&gt;&lt;P&gt; After all data has been read by the logical 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; TOP-OF-PAGE&lt;/P&gt;&lt;P&gt; In list processing when a new page starts&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;END-OF-PAGE&lt;/P&gt;&lt;P&gt; In list processing when a page ends&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT LINE-SELECTION&lt;/P&gt;&lt;P&gt; When the user triggers the predefined function code PICK&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT PF&amp;lt;nn&amp;gt;&lt;/P&gt;&lt;P&gt; When the user triggers the predefined function code PF&amp;lt;nn&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT USER-COMMAND&lt;/P&gt;&lt;P&gt; When the user triggers a function code defined in the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390120#M814020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: define event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390121#M814021</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;Event in ABAP report determine process flow of a program. The events are triggered depended on the way the output is generated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these are the events available in SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can define an event at any place depending up on the action the corresponding EVENt will be triggers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the order of events can be any order , that will be triggerd by the action which the user done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:12:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/define-event/m-p/3390121#M814021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:12:38Z</dc:date>
    </item>
  </channel>
</rss>

