<?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 Statement Performance issue ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966695#M700037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Use select count(*) from Pa000 instead of select pernr/abkrs into table.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nandha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2007 10:59:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-22T10:59:03Z</dc:date>
    <item>
      <title>Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966694#M700036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I getting the performance issue using select statements in such order for validations in selection screen. the code is given below.I wanna through the error message if any wrong entries been entered in the selection screen.The code is given below,&lt;/P&gt;&lt;P&gt;************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT pernr FROM pa0001 INTO TABLE  int_pernr&lt;/P&gt;&lt;P&gt;       WHERE pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e000(zsmp) WITH 'No entries found for given personnel number'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Internal tables for selection screen validations                    *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT abkrs FROM pa0001 INTO TABLE int_abkrs&lt;/P&gt;&lt;P&gt;     WHERE abkrs = p_abkrs.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid payroll area '.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT kostl FROM pa0001 INTO TABLE int_kostl&lt;/P&gt;&lt;P&gt;     WHERE kostl IN s_kostl AND&lt;/P&gt;&lt;P&gt;           pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid Cost Center'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT orgeh FROM pa0001 INTO TABLE int_orgeh&lt;/P&gt;&lt;P&gt;   WHERE orgeh IN s_orgeh AND&lt;/P&gt;&lt;P&gt;         pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid Organization Unit'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT persg FROM pa0001 INTO TABLE int_persg&lt;/P&gt;&lt;P&gt;   WHERE persg IN s_persg AND&lt;/P&gt;&lt;P&gt;         pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid Employee Group'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT persk FROM pa0001 INTO TABLE int_persk&lt;/P&gt;&lt;P&gt;   WHERE persk IN s_persk AND&lt;/P&gt;&lt;P&gt;         persg = 3 AND&lt;/P&gt;&lt;P&gt;         pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid Employee Sub-Group'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT abkrs FROM pa0001 INTO TABLE int_abkrs&lt;/P&gt;&lt;P&gt;   WHERE abkrs IN s_abkrs AND&lt;/P&gt;&lt;P&gt;         pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e000(zsmp) WITH 'Invalid payroll area'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************************&lt;/P&gt;&lt;P&gt;I need to validate those fields using a single select statement else some other methods awaiting for ur suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966694#M700036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966695#M700037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Use select count(*) from Pa000 instead of select pernr/abkrs into table.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nandha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966695#M700037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966696#M700038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
************************************************************
data : l_abkrs type pa0001-abkrs,
         l_pernr  type pa0001-pernr,
         l_kostl  type pa0001-kostl,
         l_orgeh type pa0001-orgeh.

SELECT single pernr FROM pa0001 INTO l_pernr
WHERE pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'No entries found for given personnel number'.
ENDIF.
ENDIF.
*-----------------------------------------------------------------------*
* Internal tables for selection screen validations *
*-----------------------------------------------------------------------*
SELECT single abkrs FROM pa0001 INTO l_abkrs
WHERE abkrs = p_abkrs.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid payroll area '.
ENDIF.

SELECT single kostl FROM pa0001 INTO l_kostl
WHERE kostl IN s_kostl AND
pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid Cost Center'.
ENDIF.

SELECT single orgeh FROM pa0001 INTO l_orgeh
WHERE orgeh IN s_orgeh AND
pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid Organization Unit'.
ENDIF.

SELECT single persg FROM pa0001 INTO l_persg
WHERE persg IN s_persg AND
pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid Employee Group'.
ENDIF.

SELECT single persk FROM pa0001 INTO l_persk
WHERE persk IN s_persk AND
persg = 3 AND
pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid Employee Sub-Group'.
ENDIF.

SELECT single abkrs FROM pa0001 INTO l_abkrs
WHERE abkrs IN s_abkrs AND
pernr IN s_pernr.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE e000(zsmp) WITH 'Invalid payroll area'.
ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:59:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966696#M700038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T10:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966697#M700039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sakthi,&lt;/P&gt;&lt;P&gt;hope this helps u..&lt;/P&gt;&lt;P&gt; Tables: pa0001.table2....&lt;/P&gt;&lt;P&gt;SELECT single pernr FROM pa0001WHERE pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000(zsmp) WITH 'No entries found for given personnel number'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;similarly for others too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 11:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966697#M700039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T11:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966698#M700040</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 whether the parameter is not empty. Then hit a Query on database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will reduce no of unwanted hits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 11:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966698#M700040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T11:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Performance issue ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966699#M700041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sakthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; use select single to validate the parameter values. &lt;/P&gt;&lt;P&gt; where as to validate the select-options values you can't use select single.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward for helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 11:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-performance-issue/m-p/2966699#M700041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-22T11:07:46Z</dc:date>
    </item>
  </channel>
</rss>

