<?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 Slow SQL  from PRPS via OBJNR in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596482#M594722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sirs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have extract the WBS element for certain ASSET numbers, sample sql below. since objnr is not a primary key my sql is very slow, is there a way to convert an internal wbs number (anla-posnr) to a WBS element? because prps-pspnr is displayed differently from what is stored i cannot use it in my select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT SINGLE * FROM anla.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            CONCATENATE 'PR' anla-posnr INTO objnr.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE * FROM prps WHERE objnr = objnr.&lt;/P&gt;&lt;P&gt;            WBSelem = PRPS-POSID.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jul 2007 03:31:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-28T03:31:14Z</dc:date>
    <item>
      <title>Slow SQL  from PRPS via OBJNR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596482#M594722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sirs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have extract the WBS element for certain ASSET numbers, sample sql below. since objnr is not a primary key my sql is very slow, is there a way to convert an internal wbs number (anla-posnr) to a WBS element? because prps-pspnr is displayed differently from what is stored i cannot use it in my select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT SINGLE * FROM anla.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;            CONCATENATE 'PR' anla-posnr INTO objnr.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE * FROM prps WHERE objnr = objnr.&lt;/P&gt;&lt;P&gt;            WBSelem = PRPS-POSID.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 03:31:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596482#M594722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T03:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL  from PRPS via OBJNR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596483#M594723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please aviod select *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select field1 field2 ...fieldn single into correspoing fields of table itab from dbtable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 03:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596483#M594723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T03:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL  from PRPS via OBJNR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596484#M594724</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;You can convert ANLA-POSNR  to external WBS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check the conv routine CONVERSION_EXIT_ABPSP_OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abaptips/content/view/363/62/" target="test_blank"&gt;http://www.erpgenie.com/abaptips/content/view/363/62/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check ANLA-POSNR domain its have conv,exit associated with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;P&gt;Points are always welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 04:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596484#M594724</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-07-28T04:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Slow SQL  from PRPS via OBJNR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596485#M594725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check at the domain of the WBS element. There will be conversion exita.&lt;/P&gt;&lt;P&gt;Double click on the conversion ext and you will see two FMs _INPUT &amp;amp;  _OUTPUT.&lt;/P&gt;&lt;P&gt;This are for internal &amp;amp; external format conversion of WBS element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you use according to the your requirement, example to convert from External to Internal for format use the FM ending with ---INPUT. The export parameter of this FM will be internal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now regarding SQL optimization. Avoid select * &amp;lt;----use the specific field needed.&lt;/P&gt;&lt;P&gt;Also avoid using repeated SELECT statement from the same table. In such case, first option should always if possible --select the whole required records in a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT &amp;lt;F1&amp;gt; &amp;lt;F2&amp;gt; INTO TABLE itab&lt;/P&gt;&lt;P&gt;FROM []&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN &amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE  &amp;lt;&amp;gt; = &amp;lt;&amp;gt;.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;A.Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 07:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/slow-sql-from-prps-via-objnr/m-p/2596485#M594725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T07:25:46Z</dc:date>
    </item>
  </channel>
</rss>

