<?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: Can this syntax be improved? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743053#M1458884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please see &lt;SPAN __jive_macro_name="thread" id="1283414"&gt;&lt;/SPAN&gt; before posting - you should give some information on index usage by this.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2010 16:41:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-26T16:41:06Z</dc:date>
    <item>
      <title>Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743050#M1458881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAP gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following piece of syntax is causing extremely long run times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT banfn bnfpo gsber ps_psp_pnr&lt;/P&gt;&lt;P&gt;  FROM ebkn&lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE gt_ebkn&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN gt_prps&lt;/P&gt;&lt;P&gt;  WHERE ps_psp_pnr = gt_prps-pspnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table gt_prps only has 1 line so I cannot understand why the code is taking up to 30 minutes to execute. Can anybody suggest a refinement to this line of code that will give faster run times?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743050#M1458881</guid>
      <dc:creator>former_member852447</dc:creator>
      <dc:date>2010-02-26T16:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743051#M1458882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the table has a ps_psp_pnr index in your system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, run st05 to see if it's using the index.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743051#M1458882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T16:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743052#M1458883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the value for gt_prps-pspnr for the one record you mentioned and count the number of records in SE16 for EKBN. How many records? If it is hundreds of thousands of records, then you should expect the program to take some time because all the data has to come through the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More probable cause is that you are thinking there is one record in the internal table, but the internal table is empty. Make doubly sure that the itab is just one row by verifying in debug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, ask DBAs to run stats on the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an SAP delivered index on that field - so there is really no reason for slow performance. You SQL looks OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:26:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743052#M1458883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T16:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743053#M1458884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please see &lt;SPAN __jive_macro_name="thread" id="1283414"&gt;&lt;/SPAN&gt; before posting - you should give some information on index usage by this.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:41:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743053#M1458884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T16:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743054#M1458885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies, the internal table definetely only has one entry but table EBKN is huge with field PS_PSP_PNR = 0 in most cases. PS_PSP_PNR is not a secondary index of table EBKN....are you suggesting that the program searches through every record of table EBKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743054#M1458885</guid>
      <dc:creator>former_member852447</dc:creator>
      <dc:date>2010-02-26T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743055#M1458886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iis index EBKN~P not active in your system? What release are you on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743055#M1458886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T16:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743056#M1458887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rob, Thanks for reply....I am on version ECC 6.0.......are you suggesting code like this or similar  %_HINTS ORACLE 'INDEX ("EKKN" "EKKN~P")'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 16:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743056#M1458887</guid>
      <dc:creator>former_member852447</dc:creator>
      <dc:date>2010-02-26T16:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743057#M1458888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not suggesting hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm suggesting you look at ST05 to get more information. The "explain" function should show you if it is using an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You said that PS_PSP_PNR is not part of any index, but it is used in the index I mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if most of the values of the field are the one in your where, then it will likely not use the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2010 17:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743057#M1458888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-26T17:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743058#M1458889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do the very simple test, use the SE11 and give in the value of gt_prps-pspnr, how long does this need.&lt;/P&gt;&lt;P&gt;Do the same and activate the ST05, copy the explain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 08:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743058#M1458889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T08:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743059#M1458890</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 activate ST05 while you are executing the program.&lt;/P&gt;&lt;P&gt;Please post the SQL text as it is sent to the database and the Execution plan.&lt;/P&gt;&lt;P&gt;(You get both with the EXPLAIN function in ST05).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 08:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743059#M1458890</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-01T08:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can this syntax be improved?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743060#M1458891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you all that replied. I will work as instructed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 15:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-this-syntax-be-improved/m-p/6743060#M1458891</guid>
      <dc:creator>former_member852447</dc:creator>
      <dc:date>2010-03-01T15:23:33Z</dc:date>
    </item>
  </channel>
</rss>

