<?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: Retrieve Data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183572#M1000063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; END_OF_SELECTION is the last event. You cannot process data after this event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is triggered after the START-OF-SELECTION is completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This statement tells the server that all the database reading is completed and no more data reading is going to take place.&lt;/STRONG&gt; END-OF-SELECTION is generally used for the summary/results of reports. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a program is executed by the user, the database is locked when it encounters a START-OF-SELECTION statement and the lock is released when an END-OF-SELECTION statement is encountered (to maintain the consistency). Data selection is done between START-OF-SELECTION and END-OF-SELECTION. Now if we donu2019t write the END-OF-SELECTION statement, the database will remain locked till the programs get terminated. Hence, the performance will be reduced. So it is always good practice to write END-OF-SELECTION statement after finishing the data selection from database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2008 05:35:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-25T05:35:36Z</dc:date>
    <item>
      <title>Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183571#M1000062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can i Retrieve Data after END_OF_SELECTION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183571#M1000062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183572#M1000063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; END_OF_SELECTION is the last event. You cannot process data after this event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is triggered after the START-OF-SELECTION is completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This statement tells the server that all the database reading is completed and no more data reading is going to take place.&lt;/STRONG&gt; END-OF-SELECTION is generally used for the summary/results of reports. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a program is executed by the user, the database is locked when it encounters a START-OF-SELECTION statement and the lock is released when an END-OF-SELECTION statement is encountered (to maintain the consistency). Data selection is done between START-OF-SELECTION and END-OF-SELECTION. Now if we donu2019t write the END-OF-SELECTION statement, the database will remain locked till the programs get terminated. Hence, the performance will be reduced. So it is always good practice to write END-OF-SELECTION statement after finishing the data selection from database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183572#M1000063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183573#M1000064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes you can retrieve data anywhere in your program, after &lt;/P&gt;&lt;P&gt;end-of-selection, before that, in initialization also but i dont think any requirement of this type will ever come....right it does nt make any sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  end-of-selection is the last event of the list and it is triggered after geting all the data for the database. the end-of-selection event is used for taking appropriate actions the programmer wants to take before the list is displayed. its mainly used to formatt the data before displaying&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With all the luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:36:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183573#M1000064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183574#M1000065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Yes you can retrieve the data in END-OF-SELECTION event.&lt;/P&gt;&lt;P&gt;Have a look at this sample code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT z_sdn.

DATA:
  fs_tab TYPE scarr.

DATA:
  t_tab TYPE TABLE OF scarr.


END-OF-SELECTION.

  SELECT *
    FROM scarr
    INTO TABLE t_tab.


 LOOP AT t_tab INTO fs_tab.
   WRITE: / fs_tab-carrid.
 ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183574#M1000065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183575#M1000066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Refer to these links:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5749289"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4495928"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3854651"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183575#M1000066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183576#M1000067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can retreve data in END-OF_SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to be frank, this event is mainly for list processing and has no point for which you can't retreve data in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183576#M1000067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183577#M1000068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no u cannot retrieve the data after END OF SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this report and  put a break point after end of selection check what happens &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of it_data occurs 0,
           matnr type mara-matnr,
           mbrsh type mara-mbrsh,
           mtart  type mara-mtart,
       end it_data.
data: begin of it_makt occurs 0,
           matnr type makt-matnr,
           maktx type makt-maktx,
      end of it_makt.

parameter: p_matnr type mara-matnr.

initialization.

start-of-selection.

select matnr
         mbrsh
         mtart 
   from mara into table it_data where matnr eq p_matnr.

end-of-selection.

select matnr
         maktx
         from maktx into table it_makt 
         for all entries in it_data
         where matnr eq it_data-matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 05:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-data/m-p/4183577#M1000068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T05:47:46Z</dc:date>
    </item>
  </channel>
</rss>

