<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325492#M796589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;performancewise it is not advisable to use single select for fetching data from these 2 tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use 2 selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr&lt;/P&gt;&lt;P&gt;from pa0001 into table it_0001&lt;/P&gt;&lt;P&gt;where pernr in s_pernr&lt;/P&gt;&lt;P&gt;and begda le s_date-high&lt;/P&gt;&lt;P&gt;and endda ge s_date-low.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_0001 by pernr endda descending.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_0001 comparing pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_0001[] is initial.&lt;/P&gt;&lt;P&gt;select vorna nachn from pa0002 into table it_0002 for all entries in it_0001 where pernr = it_0001-pernr and endda = '99991231'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_0002 by pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2008 12:01:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-24T12:01:22Z</dc:date>
    <item>
      <title>SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325491#M796588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HOW TO WRITE A SINGLE SELECT STATEMENT TO RETRIEVE  "PERNR FROM PA0001", "NACHN , VORNA FROM PA0002"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 11:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325491#M796588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T11:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325492#M796589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;performancewise it is not advisable to use single select for fetching data from these 2 tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use 2 selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr&lt;/P&gt;&lt;P&gt;from pa0001 into table it_0001&lt;/P&gt;&lt;P&gt;where pernr in s_pernr&lt;/P&gt;&lt;P&gt;and begda le s_date-high&lt;/P&gt;&lt;P&gt;and endda ge s_date-low.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_0001 by pernr endda descending.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_0001 comparing pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_0001[] is initial.&lt;/P&gt;&lt;P&gt;select vorna nachn from pa0002 into table it_0002 for all entries in it_0001 where pernr = it_0001-pernr and endda = '99991231'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_0002 by pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:01:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325492#M796589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T12:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325493#M796590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;KRITHIGA APPADURAI&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;   Do You want to join for these two tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plzz reward if it is useful,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mahi&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325493#M796590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325494#M796591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krithiga&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I belive if you want to retrieve just NACHN and VORNA, it is already present in PA0001 itself. The ENAME is the concatenation of VORNA, NACHN and TITEL from PA0002, may be you can look at the option of splitting after getting from PA0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ranganath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : Reward points for all useful answers !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325494#M796591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T12:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325495#M796592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi krithiga,&lt;/P&gt;&lt;P&gt;use joins as we hav only two tables...&lt;/P&gt;&lt;P&gt;select p1&lt;SUB&gt;pernr p2&lt;/SUB&gt;nachn p2&lt;SUB&gt;vorna from pa0001 as p1 join pa0002 as p2 on p1&lt;/SUB&gt;pernr = p2~pernr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward if helps,&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:05:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325495#M796592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-24T12:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325496#M796593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats not as easy as you might thought. You have to take the date ranges into account, personal subarea may have changed more often then your last name. Thats why the logical database PNP is used very often doing a provide on the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you just need actual lastname and firstname you dont need to read anything from pa0001, you can just do a select on pa0002 using a where clause with  pernr and endda = 99991231&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your statement is a little bit unclear, you do not need pa0001 for pernr, its in pa0002 too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325496#M796593</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-01-24T12:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325497#M796594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; select p1&lt;SUB&gt;pernr p2&lt;/SUB&gt;nachn p2&lt;SUB&gt;vorna from pa0001 as p1 join pa0002 as p2 on p1&lt;/SUB&gt;pernr = &lt;/P&gt;&lt;P&gt;&amp;gt; p2~pernr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What sense does this join makes having pernr in pa0002 and selecting nothing else but pernr from pa0001?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 12:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3325497#M796594</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-01-24T12:20:39Z</dc:date>
    </item>
  </channel>
</rss>

