<?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: select performance problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081639#M1506050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using field symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols: &amp;lt;fs&amp;gt; type ....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jul 2010 23:06:05 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2010-07-12T23:06:05Z</dc:date>
    <item>
      <title>select performance problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081638#M1506049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the below query,what could be the best method to avoid select * and modify statements.Kindly suggest with the piece of code.thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM febep INTO CORRESPONDING FIELDS OF TABLE it_report&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN it_febko&lt;/P&gt;&lt;P&gt;          WHERE kukey = it_febko-kukey&lt;/P&gt;&lt;P&gt;             AND vgext &amp;lt;&amp;gt; '000'&lt;/P&gt;&lt;P&gt;             AND kwbtr IN s_kwbtr&lt;/P&gt;&lt;P&gt;             AND grpnr IN s_grpnr&lt;/P&gt;&lt;P&gt;             AND vgint IN s_vgint&lt;/P&gt;&lt;P&gt;             AND vgdef IN s_vgdef&lt;/P&gt;&lt;P&gt;             AND belnr IN s_belnr&lt;/P&gt;&lt;P&gt;             AND nbbln IN s_nbbln&lt;/P&gt;&lt;P&gt;             AND budat IN s_budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  " To get all details from other tables required to be displayed on the report&lt;/P&gt;&lt;P&gt;  LOOP AT it_report INTO wa_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM f_get_info_from_it_febko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_report-hbkid = wa_febko-hbkid.&lt;/P&gt;&lt;P&gt;    wa_report-hktid = wa_febko-hktid.&lt;/P&gt;&lt;P&gt;    wa_report-bukrs = wa_febko-bukrs.&lt;/P&gt;&lt;P&gt;    MODIFY it_report FROM wa_report&lt;/P&gt;&lt;P&gt;      TRANSPORTING: hbkid, hktid, bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM f_get_txt20.&lt;/P&gt;&lt;P&gt;    wa_report-txt20 = wa_t028e-txt20.&lt;/P&gt;&lt;P&gt;    MODIFY it_report FROM wa_report&lt;/P&gt;&lt;P&gt;      TRANSPORTING txt20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM f_get_vwezw.&lt;/P&gt;&lt;P&gt;    wa_report-vwezw_txt = g_vwezw_txt.&lt;/P&gt;&lt;P&gt;    MODIFY it_report FROM wa_report&lt;/P&gt;&lt;P&gt;      TRANSPORTING vwezw_txt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_report BY hbkid hktid belnr bukrs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 23:04:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081638#M1506049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T23:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: select performance problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081639#M1506050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using field symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols: &amp;lt;fs&amp;gt; type ....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 23:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081639#M1506050</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2010-07-12T23:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: select performance problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081640#M1506051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dummyid01!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select statement can be enhanced avoiding the use of " * ". It's too much better create a structure and a internal table containing &lt;STRONG&gt;only&lt;/STRONG&gt; the fields you will need to your report. When creating the structure, name the fields as they are named in the original tables from dictionary and then don't use " INTO CORRESPONDING FIELDS " addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it's always good to think twice when using for all entries addition. You must check if your it_febko internal table is not empty before the SELECT clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from the select, take care when calling functions and forms inside a loop. Try to develop a form which takes all the data you need and use READ TABLE inside the LOOP if necessary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, use field-symbols too. I'm sure these hints will enhance your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 23:24:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081640#M1506051</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2010-07-12T23:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: select performance problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081641#M1506052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Check for secondary index available on the table for the given selection criteria and check if it_fbko[] is not initial. before the given select .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_fbko[] is not initial.&lt;/P&gt;&lt;P&gt;SELECT * FROM febep INTO CORRESPONDING FIELDS OF TABLE it_report&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_febko&lt;/P&gt;&lt;P&gt;WHERE kukey = it_febko-kukey&lt;/P&gt;&lt;P&gt;AND vgext '000'&lt;/P&gt;&lt;P&gt;AND kwbtr IN s_kwbtr&lt;/P&gt;&lt;P&gt;AND grpnr IN s_grpnr&lt;/P&gt;&lt;P&gt;AND vgint IN s_vgint&lt;/P&gt;&lt;P&gt;AND vgdef IN s_vgdef&lt;/P&gt;&lt;P&gt;AND belnr IN s_belnr&lt;/P&gt;&lt;P&gt;AND nbbln IN s_nbbln&lt;/P&gt;&lt;P&gt;AND budat IN s_budat.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 09:25:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-performance-problem/m-p/7081641#M1506052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-13T09:25:31Z</dc:date>
    </item>
  </channel>
</rss>

