<?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/1610216#M273651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &amp;lt;b&amp;gt;select * from db ti itab&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;this reads all the relevant rows from DB that satisfy the WHERE clause.&lt;/P&gt;&lt;P&gt;2. &amp;lt;b&amp;gt;select single * from db to itab&amp;lt;/b&amp;gt; this expects a primary key in WHERE clause and gets a single record. if primary keynot given like this, it fetches the first occurence.&lt;/P&gt;&lt;P&gt;3. &amp;lt;b&amp;gt;select * from db for all entries&amp;lt;/b&amp;gt; this is used for selecting the relevant rows for all the entries in the internal table &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;4. &amp;lt;b&amp;gt;select * from db for corresponding values itab&amp;lt;/b&amp;gt; same as (1) but here u r retrieving few selected fields bcoz itab doesn't have all the components as the DB table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Sep 2006 14:22:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-22T14:22:46Z</dc:date>
    <item>
      <title>select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610210#M273645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi exports,&lt;/P&gt;&lt;P&gt;Can any body tell me difference between &lt;/P&gt;&lt;P&gt;select * from db ti itab&lt;/P&gt;&lt;P&gt;select single * from db to itab&lt;/P&gt;&lt;P&gt;select * from db for all entries its&lt;/P&gt;&lt;P&gt;select * from db for corresponding values itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read in the document but I am not clear.&lt;/P&gt;&lt;P&gt;please suggest me if any good notes is there.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nithin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610210#M273645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610211#M273646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically all the below are some variations of SELECT statement to fetch data from database tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select * from db ti itab&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;It is the stand way to fetch the data from database table append the same into internal table itab.(Please check the syntax the above is incorrect). U need to make sure that itab has the same field sequence as you are fetching in the SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select single * from db to itab&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Here is fetches a single record from database as to the specified key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select * from db for all entries its&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The particular variation is used when you required to fetch data from a table, for all entries in another internal table. It can said to be equivalent to &lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;  SELECT * from db into jtab&lt;/P&gt;&lt;P&gt;  where xyz = itab-xyz.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select * from db for corresponding values itab&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;It is similar to the first statement the difference is that it would update the corresponding fields in table itab so the sequence of fields in itab and SELECt can be different&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610211#M273646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610212#M273647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nithin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.  &lt;/P&gt;&lt;P&gt;select * from db ti itab&lt;/P&gt;&lt;P&gt;It should be &lt;/P&gt;&lt;P&gt;select * from db INTO TABLE itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- A Normal select statement,&lt;/P&gt;&lt;P&gt;   which puts &amp;lt;b&amp;gt;all the records&amp;lt;/b&amp;gt; fetched&lt;/P&gt;&lt;P&gt;   in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;P&gt;select single * from db to itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ONLY 1 record&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. select * from db for all entries its&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used for further filteration&lt;/P&gt;&lt;P&gt;w.r.t some values&lt;/P&gt;&lt;P&gt;in another internal table (and not dbtable where clause)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. select * from db for corresponding values itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fetches all records,&lt;/P&gt;&lt;P&gt;and puts in itab,&lt;/P&gt;&lt;P&gt;ONLY THOSE FIELDS whose NAME Matches,&lt;/P&gt;&lt;P&gt;only those are put, rest are ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610212#M273647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610213#M273648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Nithin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from db ti itab&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;selects all the records from the db&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select single * from db to itab&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select only one record from the db&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select * from db for all entries its&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select all the entries in its from db&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select * from db for corresponding values itab&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select all the entries from itab without bothering the order in which the fields are there&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:19:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610213#M273648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610214#M273649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select * from db ti itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Retrives all the records and all fields from the database table to itsb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from db to itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select the single record and all fields based on the where condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from db for all entries its&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  for every unique entry in the internal table that you will mention in for all entries statement , it will retrive all the records and all the fields from database table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from db for corresponding values itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if the fieldnames of database table and internal table are same , then u can use corresponding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:20:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610214#M273649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610215#M273650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Nithin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Select * from DB into table Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select all records from DB and appends in itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Select Single * from DB into itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the first record from DB which matches the condition ( If any)  into itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select * from DB for all entries in its into itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select records from DB those are in its according to condition and appends it to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Select * from DB for corresponding values itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select records from DB and appends the itab where the same fields in DB and itab there. the remaining fields left blank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610215#M273650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610216#M273651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &amp;lt;b&amp;gt;select * from db ti itab&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;this reads all the relevant rows from DB that satisfy the WHERE clause.&lt;/P&gt;&lt;P&gt;2. &amp;lt;b&amp;gt;select single * from db to itab&amp;lt;/b&amp;gt; this expects a primary key in WHERE clause and gets a single record. if primary keynot given like this, it fetches the first occurence.&lt;/P&gt;&lt;P&gt;3. &amp;lt;b&amp;gt;select * from db for all entries&amp;lt;/b&amp;gt; this is used for selecting the relevant rows for all the entries in the internal table &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;4. &amp;lt;b&amp;gt;select * from db for corresponding values itab&amp;lt;/b&amp;gt; same as (1) but here u r retrieving few selected fields bcoz itab doesn't have all the components as the DB table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610216#M273651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:22: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/1610217#M273652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1)select * from db ti itab&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select all records from database table.&amp;lt;/b&amp;gt; select &lt;/P&gt;&lt;P&gt;2)single * from db to itab&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select first row  matching where condition&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3)select * from db for all entries its&lt;/P&gt;&lt;P&gt;  selets data with the entries corresponding to internal table&lt;/P&gt;&lt;P&gt;4)select * from db for corresponding values itab &lt;/P&gt;&lt;P&gt;    itab has two fields matnr,werks so only&lt;/P&gt;&lt;P&gt;    this two fields are populated in internal table&lt;/P&gt;&lt;P&gt;    irrespective of mara having 30 fields.  &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610217#M273652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: select statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610218#M273653</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;select * from selects &lt;/P&gt;&lt;P&gt;all the records from the mentioned table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from selects &lt;/P&gt;&lt;P&gt;selects single record from the table mentioned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from db for all entries its&lt;/P&gt;&lt;P&gt;select all records based on the entries selected from the previous table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from db for corresponding values itab.&lt;/P&gt;&lt;P&gt;selects the data and pushes the data into the internal table irrespective of the order defined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 14:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statements/m-p/1610218#M273653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T14:52:16Z</dc:date>
    </item>
  </channel>
</rss>

