<?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 statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002781#M709397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdul,&lt;/P&gt;&lt;P&gt;We use &amp;lt;b&amp;gt;select *&amp;lt;/b&amp;gt; when you require all the fields from the table ..&lt;/P&gt;&lt;P&gt;eg: select * from Mara where matnr = ...&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select upto 1 rows&amp;lt;/b&amp;gt; when dnt have any all primary key values and still u need a record.&lt;/P&gt;&lt;P&gt;eg:select field1 field2 frome mara where matnr = .. upto 1 rows.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select single&amp;lt;/b&amp;gt; is used when u require a single field from all the records in that table..&lt;/P&gt;&lt;P&gt;select single mtext from mara where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;we use&amp;lt;b&amp;gt; select distinct&amp;lt;/b&amp;gt; when u require the output to be in sorted order ...&lt;/P&gt;&lt;P&gt;eg SELECT DISTINCT (ftab) &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF wa &lt;/P&gt;&lt;P&gt;       WHERE &lt;/P&gt;&lt;P&gt;         carrid   = 'LH'. &lt;/P&gt;&lt;P&gt;  WRITE: / wa-cityfrom, wa-cityto. &lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Nov 2007 11:52:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-05T11:52:30Z</dc:date>
    <item>
      <title>select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002778#M709394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I have a doubt regarding select statement. i want to know when do we use select*, select upto 1 rows, select single, select distinct, where should we put the data fetched from these statements i.e table or work area in each. &lt;/P&gt;&lt;P&gt;Pl give sample of each case.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Quavi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2007 11:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002778#M709394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-05T11:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002779#M709395</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;when u want to only one record then u will use workarea inorder to put ur data,otherwise if u want more than one record go for internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check with examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from mara into table wa_mara&lt;/P&gt;&lt;P&gt;where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into wa_mara upto 1 rows&lt;/P&gt;&lt;P&gt;where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara into table it_mara&lt;/P&gt;&lt;P&gt;where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2007 11:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002779#M709395</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-11-05T11:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002780#M709396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abdul quavi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * will be translated by database interface into a fieldlist of all fields of the databse table fetched from. It is the easiest for coding and does not need any change when database structure changes. But it is quite time and space-consuming because always many non-necessary fields are retrieved and transported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The destination area may be a work area or an internal table; for table you need addition INTO TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use select up to 1 rows if you can not specify the full primary key in WHERE condition but want only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE should be used if you can specify the full prinary key in WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also look at WIKI, FAQ or GOOGLE. Lots of information avalable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2007 11:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002780#M709396</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-11-05T11:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002781#M709397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdul,&lt;/P&gt;&lt;P&gt;We use &amp;lt;b&amp;gt;select *&amp;lt;/b&amp;gt; when you require all the fields from the table ..&lt;/P&gt;&lt;P&gt;eg: select * from Mara where matnr = ...&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select upto 1 rows&amp;lt;/b&amp;gt; when dnt have any all primary key values and still u need a record.&lt;/P&gt;&lt;P&gt;eg:select field1 field2 frome mara where matnr = .. upto 1 rows.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select single&amp;lt;/b&amp;gt; is used when u require a single field from all the records in that table..&lt;/P&gt;&lt;P&gt;select single mtext from mara where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;we use&amp;lt;b&amp;gt; select distinct&amp;lt;/b&amp;gt; when u require the output to be in sorted order ...&lt;/P&gt;&lt;P&gt;eg SELECT DISTINCT (ftab) &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF wa &lt;/P&gt;&lt;P&gt;       WHERE &lt;/P&gt;&lt;P&gt;         carrid   = 'LH'. &lt;/P&gt;&lt;P&gt;  WRITE: / wa-cityfrom, wa-cityto. &lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2007 11:52:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/3002781#M709397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-05T11:52:30Z</dc:date>
    </item>
  </channel>
</rss>

