<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601940#M270266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out the following link , which has got a good explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/events-related-to-reporting.htm" target="test_blank"&gt;http://www.sap-img.com/abap/events-related-to-reporting.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Oct 2006 08:40:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-10T08:40:45Z</dc:date>
    <item>
      <title>events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601939#M270265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friendz,&lt;/P&gt;&lt;P&gt;could u plz explain all the evnts of a classical and interractive reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:37:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601939#M270265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T08:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601940#M270266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out the following link , which has got a good explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/events-related-to-reporting.htm" target="test_blank"&gt;http://www.sap-img.com/abap/events-related-to-reporting.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:40:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601940#M270266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T08:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601941#M270267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sireesha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Please find the Events Details for Reports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following events occur at runtime of a typical report program which uses logical databases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event keyword					Event&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;INITIALIZATION 	Point before the selection screen 			is displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you start a program in which a selection screen is defined (either in the program itself or in the linked logical database program), the system normally processes this selection screen first. If you want to execute a processing block before the selection screen is processed, you can assign it to the event keyword INITIALIZATION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN 	Point after processing user &lt;/P&gt;&lt;P&gt;                        input on the selection screen  &lt;/P&gt;&lt;P&gt;                        while the selection screen is &lt;/P&gt;&lt;P&gt;                        still active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The event keyword AT SELECTION-SCREEN provides you with several possibilities to carry out processing blocks while the system is processing the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION 	Point after processing the &lt;/P&gt;&lt;P&gt;                        selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The event START-OF-SELECTION gives you the possibility of creating a processing block after processing the selection screen and before accessing database tables using a logical database. You can use this processing block, for example, to set the values of internal fields or to write informational statements onto the output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the START-OF-SELECTION event, also all statements are processed that are not attached to an event keyword except those that are written behind a FORM-ENDFORM block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt;	Point at which the logical database&lt;/P&gt;&lt;P&gt;                offers a line of the database table &lt;/P&gt;&lt;P&gt;		&amp;lt;table&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most important event for report programs with an attached logical database is the moment at which the logical database program has read a line from a database table (see Accessing Data Using Logical Databases ). To start a processing block at this event, use the GET statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt; [FIELDS &amp;lt;list&amp;gt;].&lt;/P&gt;&lt;P&gt;After this statement, you can work with the current line of the database table &amp;lt;table&amp;gt;. The data is provided in the table work area &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt; LATE    Point after processing all tables which are hierarchically subordinate to the database table &amp;lt;table&amp;gt; in the structure  of the logical database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To start a processing block at the moment after the system has processed all database tables of a logical database that are hierarchically inferior to a specific database table, use the event keyword GET as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;GET &amp;lt;table&amp;gt; LATE [FIELDS &amp;lt;list&amp;gt;]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In analogy to report programs that use only SELECT statements (see table in Comparison of Access Methods ), the processing block of a GET &amp;lt;table&amp;gt; LATE statement would appear directly before the ENDSELECT statement in the SELECT loop for the database table &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;END-OF-SELECTION  Point after processing all lines &lt;/P&gt;&lt;P&gt;                   offered by the logical database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define a processing block after the system has read and processed all database tables of a logical database, use the keyword END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following events occur during the processing of the output list of a report program:&lt;/P&gt;&lt;P&gt;Event keyword					Event&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE		Point during list processing when&lt;/P&gt;&lt;P&gt;                         a new page is started &lt;/P&gt;&lt;P&gt;END-OF-PAGE		Point during list processing when&lt;/P&gt;&lt;P&gt;                        a page is ended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following events occur during the display of the output list of a report program:&lt;/P&gt;&lt;P&gt;Event keyword					Event&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION	Point at which the user selects a &lt;/P&gt;&lt;P&gt;                        line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND	Point at which the user presses a function key or enters a command in the command field.&lt;/P&gt;&lt;P&gt;AT PF&amp;lt;nn&amp;gt;		Point at which the user presses&lt;/P&gt;&lt;P&gt;                        the function key with the &lt;/P&gt;&lt;P&gt;                        function code 		PF&amp;lt;n&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the selection screen, ABAP/4 offers an interactive element also for report programs. You can define a selection screen without having to bother about all the details required in dialog programming. &lt;/P&gt;&lt;P&gt;The selection screen is always processed directly after a report program is started. The user can enter field values and selection criteria on this screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601941#M270267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T08:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601942#M270268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It gives event Blocks in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Ragu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601942#M270268</guid>
      <dc:creator>raguraman_c</dc:creator>
      <dc:date>2006-10-10T08:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601943#M270269</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;Go thru this docu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CLASSICAL REPORTS&amp;lt;/b&amp;gt;Events in Classical report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Events associated with classical report are as follows and each one will be discussed in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;#149;	INITIALIZATION&lt;/P&gt;&lt;P&gt;&amp;#149;	AT SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;&amp;#149;	AT SELECTION-SCREEN ON &amp;lt;field&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;#149;	START-OF-SELECTION&lt;/P&gt;&lt;P&gt;&amp;#149;	TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;&amp;#149;	END-OF-PAGE&lt;/P&gt;&lt;P&gt;&amp;#149;	END-OF-SELECTION&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;In this case first three events are associated with selection screen. Rest of the events are associated with your list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	INITIALIZATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have already seen how to fill default values for the selection criteria. But in many cases you need to calculate the value and then put it in selection criteria. For example, say, you are accepting date from user and you need to fill in the default value for lower range as sy-datum &amp;#150; 30 days and sy-datum for higher range. In this case you are calculating lower range and then filling the criteria. This can be done in INITIALIZATION event.  Piece of code to do the above task would look like the following:&lt;/P&gt;&lt;P&gt;Tables: Sflight.&lt;/P&gt;&lt;P&gt;Select-options: fldate1 for sflight-fldate.&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;Data: date1 like SY-DATUM.&lt;/P&gt;&lt;P&gt;Date1 = sy-datum &amp;#150; 30.&lt;/P&gt;&lt;P&gt;Fldate1-low = date1.&lt;/P&gt;&lt;P&gt;Fldate1-high = sy-datum.&lt;/P&gt;&lt;P&gt;Append fldate1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here appending is required because fldate1 is int&amp;#146; table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This event is triggered when you execute your program for the first time i.e., before selection screen is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	AT SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When user enters the values in the fields of selection screen and clicks on execute button, this event gets triggered. This event is basically for checking the values entered by the user for the fields of the selection screen i.e., data validity checking. This event is for entire selection screen.  For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are accepting carrid, connid, fldate from user and you don&amp;#146;t want to proceed if user enters no value for carrid and fldate.  Using AT SELECTION-SCREEN can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select-options: carrid1 for sflight-carrid,&lt;/P&gt;&lt;P&gt;		Connid1 for sflight-connid,&lt;/P&gt;&lt;P&gt;		F1date1 for sflight-f1date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;If carrid1-low ne &amp;#145;  &amp;#146; and fldate1-low = &amp;#145;  &amp;#146;.&lt;/P&gt;&lt;P&gt;    Error message.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, if both the fields are entered blank, then the user gets error message.&lt;/P&gt;&lt;P&gt;Basically, this event is for many fields on selection screen.  Usually, it is for the fields which are logically related.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	AT SELECTION-SCREEN ON  &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you want to check for specific value of a field. For example, carrid should be in the range of &amp;#145;LH&amp;#146; and &amp;#145;SQ&amp;#146;. This can be done in this event.  Basically, this event is for checking individual fields. You can have many AT selection-screen events in your program (i.e., for each field specified in the Select-Options).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select-Options carrid1 for sflight-carrid.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;If carrid1-low ne &amp;#145;LH&amp;#146; and carrid1-high ne &amp;#145;SQ&amp;#146;.&lt;/P&gt;&lt;P&gt;   Error message.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Here the system will not proceed on entering wrong values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	START-OF-SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the first event for your list. Once all the events are triggered for selection screen, the data is retrieved from database. Data declaration, select statements are done in this event. Consider the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;Data:  mtype i.&lt;/P&gt;&lt;P&gt;Tables: sflight.&lt;/P&gt;&lt;P&gt;Select * from sflight where carrid = &amp;#145;LH&amp;#146;.&lt;/P&gt;&lt;P&gt;   Write: / sflight-carrid,sflight-connid.&lt;/P&gt;&lt;P&gt;Endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is triggered with first WRITE statement or whenever new page is triggered.  Advantage of using this event is that, whatever you write under this event, is applicable to all the pages. If you don&amp;#146;t have any write statement before TOP-OF-PAGE or in START-OF-SELECTION, this event is not triggered at all.  For example, if you want the name of company and column headers for all the pages, it can be written in this event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;INTELLIGROUP ASIA PVT. LTD.&amp;#146;&lt;/P&gt;&lt;P&gt;Write : / 10 &amp;#145;carrid&amp;#146;, 20 &amp;#145;connid&amp;#146;, 30 &amp;#145;fldate&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	END-OF-PAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is triggered at the end of page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End-of-page.&lt;/P&gt;&lt;P&gt;Write : / &amp;#145;page number&amp;#146;, sy-pagno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case page number will be written on every page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conditional triggering of EOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZDEMO1 line-count 15(3).&lt;/P&gt;&lt;P&gt;Top-of-page.&lt;/P&gt;&lt;P&gt;Write: &amp;#145;this line is written by top-of-page event&amp;#146;.&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;Write: &amp;#145;this line is written by start-of-selection event&amp;#146;.&lt;/P&gt;&lt;P&gt;End-of-page.&lt;/P&gt;&lt;P&gt;Write : &amp;#145;this line is written by end-of-page event&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case EOP will never be triggered, as end of page is never reached. The total Line-count defined for page = 15 in which 3 lines are for footer area. The output of the above code will be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This line is written by top of page event.&lt;/P&gt;&lt;P&gt;This line is written by start of selection event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In output screen, only two lines are written and cursor remains still on 3rd line, the end-of-page event is not triggered. To trigger end of page event, cursor should reach at the last position, in this case on 11th line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Such cases are quite common, and could be overcome by conditional triggering of end of page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sy-linct is the system variable, which gives total line count of a list.&lt;/P&gt;&lt;P&gt;Sy-linno is the system variable, which gives the current line number where the cursor is placed on the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report zdemo1 line count 20(1).&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;Data: m type i.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;this is first line&amp;#146;.&lt;/P&gt;&lt;P&gt;Do 5 times.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;the number is&amp;#146;, sy-index.&lt;/P&gt;&lt;P&gt;Enddo.&lt;/P&gt;&lt;P&gt;M = sy-linct, sy-linno &amp;#150; 1.&lt;/P&gt;&lt;P&gt;Skip x.&lt;/P&gt;&lt;P&gt;End-of-page.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;page end&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output of above example is as follows :&lt;/P&gt;&lt;P&gt;This is first line.&lt;/P&gt;&lt;P&gt;The number is 1&lt;/P&gt;&lt;P&gt;The number is 2&lt;/P&gt;&lt;P&gt;The number is 3&lt;/P&gt;&lt;P&gt;The number is 4&lt;/P&gt;&lt;P&gt;The number is 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After skipping 10 lines&lt;/P&gt;&lt;P&gt;Page end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, with all write statement, you don&amp;#146;t reach to the end of page. After all write statement, m is calculated in this case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M = 20 &amp;#150; 8 &amp;#150; 1, So m is 12. And 11 lines are skipped after write statement and end of page is reached. (In this case you have 6 write statement so 6 lines + 1 line for page number and 1 horizontal line which is displayed for any list.  So cursor is on 8th line and is subtracted from total line count i.e, 20.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Common errors that user commits&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stating of another event denotes the end of any event.  If you forget to mention the next event then everything is included in the same event.  Consider the following case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;If carrid1-low ne &amp;#145;   &amp;#145;.&lt;/P&gt;&lt;P&gt;Err. or message.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;INTELLIGROUP ASIA P. LTD.&amp;#146;&lt;/P&gt;&lt;P&gt;WRITE: / 10 &amp;#145;CARRID&amp;#146;, 20 &amp;#145;CONNID&amp;#146;, 30 &amp;#145;FLDATE&amp;#146;.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&amp;#133;.&lt;/P&gt;&lt;P&gt;&amp;#133;.&lt;/P&gt;&lt;P&gt;&amp;#133;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case all the write statement are included in the `at selection screen&amp;#146; as top-of-page is not specified. The end of `at selection-screen&amp;#146; is denoted by the starting of start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though the sequence of events in program is immaterial, it is a good programming practice to write all the events in the order specified above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Variants with selection criteria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In many cases you need report to execute report at regular interval for certain fixed values of selection criteria. That means each times you execute the report you need to enter its values again and again. ABAP/4 provides the facility by which you can define the values for selection screen and store it. Using VARIANTS can do this. It can be defined as group of values used for selection criteria while executing report.  For a particular report, you create a variant which means variant created for particular report cannot be used for another report. The group of values for the selection criteria is saved and assigned a variant name.  So every time you call a report, you need not specify the values for selection criteria but instead call the variant thus avoiding extra typing. User can have many variants for a single report.  Each of them can be used as different type of information. For example, if a manager wants to see how an employee in personnel department or admin department has performed. He need not enter the department, one has to just execute the report with variant. In case he doesn&amp;#146;t know about the variant, which is available, he can display list of variants attached to the report and values assigned to each variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Execute the report program. The selection screen is displayed.&lt;/P&gt;&lt;P&gt;&amp;#149;	Enter the values for selection screen and click on saves.&lt;/P&gt;&lt;P&gt;-	System displays the variant screen&lt;/P&gt;&lt;P&gt;&amp;#149;	Enter the variant name and description for it.&lt;/P&gt;&lt;P&gt;&amp;#149;	Save it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually the variants are useful when you need to execute the report in background, which will be discussed in background processing.&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;&amp;lt;b&amp;gt;INTERACTIVE REPORTS&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About interactive report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A classical report consists of one program that creates a single list.  This means that when the list is displayed, it has to contain all the requested data, regardless of the number of details the user want to see.  This procedure may result in extensive and cluttered lists from which the user has to pick the relevant data. The desired selections must be made before hand and the report must provide detailed information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not possible using the classical report and for this ABAP/4 has provided reporting feature called INTERACTIVE REPORT. The list produced by classical report doesn&amp;#146;t allow user to interact with the system but the list produced by interactive report allows the user to interact with the system i.e., user can tell the system, that he needs further information. Depending upon what the user tells the system, the action is taken. Interactive reporting thus reduces information retrieval to the data actually required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interactive reporting allows the user to participate in retrieving and presenting data at each level during the session.  Instead of presenting one extensive and detailed list with cluttered information, with interactive reporting you can create a condensed basic list from which the user can call detailed information by positioning the cursor and entering commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detailed information is presented in secondary lists. A secondary list may either overlay the basic list completely or appear in an additional dialog window on the same screen.  The secondary list can itself be interactive again. The basic list is not deleted when secondary list is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User can interact with the system by:&lt;/P&gt;&lt;P&gt;&amp;#149;	Double clicking or pressing F2&lt;/P&gt;&lt;P&gt;&amp;#149;	Selecting menu option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like classical report, the interactive report is also event driven. Both the action mentioned above trigger events and code is written to handle these events.  The events triggered by this action are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	At line-selection&lt;/P&gt;&lt;P&gt;&amp;#149;	At user-command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Top-of-Page During Line-Selection for Secondary Page Header info&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interactive report consists of one BASIC list and 20 secondary list. Basic list is produced by START-OF-SELECTION event. When the user double clicks on the basic list or chooses the menu option, the secondary list is produced. All the events associated with classical report except end-of-page are applicable only to basic list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double clicking is the way most users navigate through programs. Double clicking on basic list or any secondary list triggers the event AT LINE-SELECTION. SY-LSIND denotes the index of the list currently created. For BASIC list it is always 0.  Following piece of code shows how to handle the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start-of-selection.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;this is basic list&amp;#146;.&lt;/P&gt;&lt;P&gt;At line-selection.&lt;/P&gt;&lt;P&gt;Write : &amp;#145;this is first secondary list&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the output will be displayed on basic list i.e.&lt;/P&gt;&lt;P&gt;This is basic list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When user double clicks on this line, the event at line-selection gets triggered and secondary list is produced, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is first secondary list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can go back to basic list by clicking on F3 or back icon on the standard tool bar.  For this list, the value of sy-lsind will be 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIDE technique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case thins are much simpler. Consider the case, wherein you display fields from table sflight in basic list. When user double clicks on any sflight-carrid, you are displaying the detailed information related to that particular carrid on secondary list.  Hence there is a need to store the clicked carrid in some variable.  So that you can access this carrid for next list. ABAP/4 has facility; a statement called HIDE, which provides the above functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIDE command temporarily stores the content of clicked field in system area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIDE &amp;lt;FIELDS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement stores the contents of variable &amp;lt;f&amp;gt; in relation to the current output line (system field SY-LINNO) internally in the so-called HIDE area. The variable &amp;lt;f&amp;gt; must not necessarily appear on the current line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to place the HIDE statement always directly after the output statement i.e., WRITE for the variable &amp;lt;f&amp;gt;.  As when you hide the variable, control is passed to next record.  While writing, WRITE statement takes that record from header and writes it on to the list, but when writing onto your interactive list you will miss out 1st record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To hide several variables, use chain HIDE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored.  A line can be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	By an interactive event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The HIDE area is a table, in which the system stores the names and values of all HIDE fields for each list and line number.  As soon as they are needed, the system reads the values from the table.  (Please try to find the name of this table.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sy-lsind indicates the index of the list and can be used to handle all the secondary lists.  When the user double clicks on the line or presses F2, sy-lsind is increased by one and this new sy-lsind can be handled.  For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;this is basic list&amp;#146;.&lt;/P&gt;&lt;P&gt;&amp;#149;	Will create a basic list.&lt;/P&gt;&lt;P&gt;If sy-lsind = 1.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;this is first secondary list&amp;#146;.&lt;/P&gt;&lt;P&gt;Elseif sy-lsind = 2.&lt;/P&gt;&lt;P&gt;Write: / &amp;#145;This is second secondary list&amp;#146;.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this code is executed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;#149;	Basic list is produced. &lt;/P&gt;&lt;P&gt;&amp;#149;	When the user clicks on the basic list, sy-lsind becomes one.&lt;/P&gt;&lt;P&gt;&amp;#149;	AT LINE-SELECTION event is triggered.&lt;/P&gt;&lt;P&gt;&amp;#149;	Whatever is written under IF Sy-lsind = 1, gets executed.&lt;/P&gt;&lt;P&gt;&amp;#149;	Secondary list is produced.&lt;/P&gt;&lt;P&gt;&amp;#149;	Again if user clicks on this list, sy-lsind becomes two.&lt;/P&gt;&lt;P&gt;&amp;#149;	AT LINE-SELECTION gets triggered.&lt;/P&gt;&lt;P&gt;&amp;#149;	Code written under IF Sy-lsind = 2, gets executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events/m-p/1601943#M270269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T08:49:49Z</dc:date>
    </item>
  </channel>
</rss>

