<?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: Reporting events in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957387#M393913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First thing is that you cannot have write statements in initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The order of execution is, Initialization , start-of-selection,Top-of-page.&lt;/P&gt;&lt;P&gt;But If there is any write statement in Start-of-selection, then the Top-of-page event will get triggered and then only the write statement in the start-of-selection write statement will be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2007 11:48:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-26T11:48:57Z</dc:date>
    <item>
      <title>Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957385#M393911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In report if we have write statements in initialization, top of page and in start of selection then which event is first excuted and what is the output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vamsi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957385#M393911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957386#M393912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;TOP-OF-PAGE.

INITIALIZATION.

START-OF-SELECTION.

END-OF-SELECTION.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this helps.&lt;/P&gt;&lt;P&gt;U can try out a sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward and close the other threads opened by you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Judith Jessie Selvi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:47:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957386#M393912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957387#M393913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First thing is that you cannot have write statements in initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The order of execution is, Initialization , start-of-selection,Top-of-page.&lt;/P&gt;&lt;P&gt;But If there is any write statement in Start-of-selection, then the Top-of-page event will get triggered and then only the write statement in the start-of-selection write statement will be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957387#M393913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957388#M393914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;          The sequence of events for a report are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION and then &lt;/P&gt;&lt;P&gt;START -OF-SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and TOP-OF-PAGE is fired before the list generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you case it will TOP-OF-PAGE first then output of INITIALIZATION and then START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:49:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957388#M393914</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-02-26T11:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957389#M393915</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;first top-of-page,initialization and then start-of-selection will beexecuted..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generaly when the first write statement is encountered point goes to tiop-of-page that will be executed then it comes back to the point of execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and generally Initialization event is used to initialize the selection-screen fieilds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As u asked in ur case,as given above it will be executed.&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, 26 Feb 2007 11:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957389#M393915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957390#M393916</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;First event -&lt;/P&gt;&lt;P&gt;Initialization : triggered when the report is loaded in memory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At selection-screen output : triggered when the selection screen is loaded in memory before being displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At selection-screen : before leaving the selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection : the first event for displaying the report. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event keyword defines an event block whose event is triggered by the ABAP runtime environment &lt;/P&gt;&lt;P&gt;when calling the executable program selection screen processing of a selection screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an executable program, all statements that are not declarations, &lt;/P&gt;&lt;P&gt;and are listed before the first explicit processing block, are assigned to this event block.&lt;/P&gt;&lt;P&gt; If the program does not contain an explicitly defined event block START-OF-SELECTION,&lt;/P&gt;&lt;P&gt; these statements form the complete event block START-OF-SELECTION.&lt;/P&gt;&lt;P&gt; If a program contains an explicitly defined event block START-OF-SELECTION, &lt;/P&gt;&lt;P&gt;these statements are added to the beginning of the event block. &lt;/P&gt;&lt;P&gt;If the program contains no explicitly defined event blocks, &lt;/P&gt;&lt;P&gt;these statements form the entire event block START-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;end-of-selection : after the start-of-selection is completed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;classiscal report events. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page : every time a new page is started in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-page : every time the list data reaches the footer region of the page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interactive report events. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top of page during line selection : top of page event for secondary list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at line-selection : evey time user dbl-clicks(F2) on the list data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at pF&amp;lt;key&amp;gt; : function key from F5 to F12 to perform interactive action on the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at user-command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957390#M393916</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-02-26T11:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957391#M393917</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;   i doubt it judith..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;write '1'.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;write '2'.&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;write '3'.&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;write '4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output of the above code is&lt;/P&gt;&lt;P&gt;4 &lt;/P&gt;&lt;P&gt;1 &lt;/P&gt;&lt;P&gt;2 &lt;/P&gt;&lt;P&gt;3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page will be triggered first&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957391#M393917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957392#M393918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S thats right, that is in the order of events in report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi vamsi,&lt;/P&gt;&lt;P&gt;See this sample code for simpale report&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztemplate
          NO STANDARD PAGE HEADING
          LINE-SIZE 130
          LINE-COUNT 65
          MESSAGE-ID zm.
**************************************
* The Data Declarations
 TABLES:    mara." General Material Data.
************************************************************************
* Type Declarations:
************************************************************************
 TYPES : BEGIN OF ty_mara,
          cb(1),
          matnr LIKE mara-matnr,
          mtart LIKE mara-mtart,
          matkl LIKE mara-matkl,
         END OF ty_mara.
************************************************************************
* Internal Tables:
************************************************************************
* The following structure type must be defined in the data dictionary
 DATA :  i_output TYPE ty_mara OCCURS 0 WITH HEADER LINE.

DATA: lines TYPE i, free TYPE i.

* The Selection Screen Definition
SELECTION-SCREEN BEGIN OF BLOCK b_main WITH FRAME TITLE text-b01.
*
*SELECTION-SCREEN skip.
*
SELECT-OPTIONS: s_matnr FOR  mara-matnr.                  "Material No
*PARAMETERS:     P_XXXXX like XXXX-XXXXX.                   "Description
*PARAMETERS:     CB_XXXX as checkbox.                       "Description
*PARAMETERS:     RB_XXXY radiobutton group XXX default 'X'. "Description
*PARAMETERS:     RB_XXXZ radiobutton group XXX.             "Description
*
*SELECTION-SCREEN COMMENT fmt name.

SELECTION-SCREEN END OF BLOCK b_main.
*SELECTION-SCREEN ULINE.
*eject
************************************************************************
* INITIALIZATION
************************************************************************
INITIALIZATION.
*

************************************************************************
* AT SELECTION-SCREEN
************************************************************************
AT SELECTION-SCREEN.

*Validate material no details
IF NOT s_matnr[] IS INITIAL.
LOOP AT s_matnr.
IF NOT s_matnr-low  IS INITIAL.

  SELECT SINGLE matnr INTO v_matnr
         FROM mara
         WHERE matnr = s_matnr-low.

  IF sy-subrc NE 0.
    MESSAGE i128.
    LEAVE LIST-PROCESSING.
  ENDIF.
  ENDIF.
IF NOT s_matnr-high IS INITIAL.
  SELECT SINGLE matnr INTO v_matnr
         FROM mara
         WHERE matnr = s_matnr-high.

  IF sy-subrc NE 0.
    MESSAGE i128.
    LEAVE LIST-PROCESSING.
  ENDIF.
  ENDIF.
ENDLOOP.

ENDIF.
************************************************************************
* START-OF-SELECTION
************************************************************************
START-OF-SELECTION.
   REFRESH: i_output.
  CLEAR  : i_output.
  SELECT matnr
         mtart
         matkl
         INTO TABLE i_output
         FROM mara
         WHERE mara~matnr IN s_matnr.


  IF sy-subrc NE 0.
    MESSAGE i000 WITH text-002.
    " No records found for selected criteria
        leave list-processing.
  ENDIF.
  IF NOT i_output[] IS INITIAL.
    LOOP AT i_output INTO wa_output.
      WRITE:/001 wa_output-cb AS checkbox,
             003 wa_output-matnr,
             015 wa_output-mtart,
             024 wa_output-matkl.
      CLEAR wa_output.
    ENDLOOP.
  ENDIF.

************************************************************************
* END-OF-SELECTION
************************************************************************
END-OF-SELECTION.
  lines = sy-linno - 1.

SET PF-STATUS 'ZSTATUS'.

AT USER-COMMAND.
      wa_output-cb = space.
      SET PF-STATUS 'ZSTATUS' EXCLUDING 'SAVE'.
      DO lines TIMES.
        READ LINE sy-index FIELD VALUE wa_output-cb.
          IF wa_output-cb = 'X'.
        MODIFY i_output  FROM wa_output INDEX sy-tabix TRANSPORTING cb.
        ENDIF.
      ENDDO.

CASE sy-ucomm.
WHEN 'SAVE'.
      DELETE i_output WHERE cb = 'X'.
WHEN 'BACK'.
LEAVE SCREEN.
ENDCASE.

************************************************************************
* TOP-OF-PAGE.
************************************************************************
TOP-OF-PAGE.
  ULINE.
  FORMAT INTENSIFIED OFF.
  FORMAT COLOR COL_HEADING.
  WRITE:/001 'CB' ,
         003 'Material No',
         015 'Mat type',
         024 'Mat group'.

  FORMAT COLOR OFF.
  FORMAT INTENSIFIED ON.
  ULINE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957392#M393918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957393#M393919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;The order of triggering of events &lt;/P&gt;&lt;P&gt;1. Top-of-page&lt;/P&gt;&lt;P&gt;2. Initialization&lt;/P&gt;&lt;P&gt;3. start-of-selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report zex36.&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  WRITE : / 'sree'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;  WRITE : / 'kanth'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  WRITE : / 'Reddy'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;O/P will be&lt;/P&gt;&lt;P&gt;kanth&lt;/P&gt;&lt;P&gt;sree&lt;/P&gt;&lt;P&gt;Reddy&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 11:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957393#M393919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T11:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957394#M393920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;top -of -page will be first trigerred,then initialization then start-of- selection and then end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward this with points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 12:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reporting-events/m-p/1957394#M393920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-26T12:12:33Z</dc:date>
    </item>
  </channel>
</rss>

