<?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/1544709#M247819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select single land1 from kna1
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But you can write either:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: kna1.

select single * from kna1
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
tables: kna1.
data:   country like kna1-land1.

select single land1 from kna1
  into country
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Sep 2006 18:22:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-02T18:22:58Z</dc:date>
    <item>
      <title>select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544705#M247815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi to all&lt;/P&gt;&lt;P&gt;how to write an select statement without an into class&lt;/P&gt;&lt;P&gt;can we write like this &lt;/P&gt;&lt;P&gt;select single land1 from kna1&lt;/P&gt;&lt;P&gt;where kunnr = kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 16:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544705#M247815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-02T16:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544706#M247816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  you can write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Ramu N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 16:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544706#M247816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-02T16:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544707#M247817</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 the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;tables kna1.&lt;/P&gt;&lt;P&gt;parameters p_kunnr like kna1-kunnr.&lt;/P&gt;&lt;P&gt;select single * from kna1 where kunnr = p_kunnr.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark all useful answers...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 16:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544707#M247817</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-09-02T16:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544708#M247818</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;It is possible to write a SELECT without INTO clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) If you want to fecth single record...&lt;/P&gt;&lt;P&gt;   SELECT * FROM KAN1 WHERE KUNNR = KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;   X_KNA1-KUNNR = KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;   X_KNA1-NAME1 = KNA1-NAME1.&lt;/P&gt;&lt;P&gt;2) If you want to fecth multiple records...&lt;/P&gt;&lt;P&gt;   SELECT * FROM KNA1 WHERE KUNNR IN S_KUNNR. "(S_KUNNR is select option)&lt;/P&gt;&lt;P&gt;     ITAB-KUNNR = KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;     ITAB-NAME1 = KNA1-NAME1.&lt;/P&gt;&lt;P&gt;     APPEND ITAN. CLEAR ITAB.&lt;/P&gt;&lt;P&gt;   ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 17:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544708#M247818</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-09-02T17:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544709#M247819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't write:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select single land1 from kna1
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But you can write either:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: kna1.

select single * from kna1
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
tables: kna1.
data:   country like kna1-land1.

select single land1 from kna1
  into country
  where kunnr = kna1-kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Sep 2006 18:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544709#M247819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-02T18:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544710#M247820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friend ,&lt;/P&gt;&lt;P&gt;                 i m beginer in abap and want to write my first program with select statement . if possible ,please guide me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Apr 2007 10:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544710#M247820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-21T10:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544711#M247821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when selecting anything, you want a result. This result is passed to the field given with INTO. If you don't write INTO, you have an implicit INTO. Examples are already given with TABLES statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is interpreted as SELECT {all field names of KNA1} INTO KNA1 FROM KNA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COUNT( * ) FROM KNA1 WHERE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will put the number of records matching the WHERE clause into system field SY_DBCNT.&lt;/P&gt;&lt;P&gt;It is just the simplified way of writing ommitting the implicit INTO SY-DBCNT clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can not write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single land1 from kna1&lt;/P&gt;&lt;P&gt;where kunnr = kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even if you have a structure field with the name KNA1. This field can be defined with the (outdated) TABLES: KNA1 statement because the field land1 is different from the (implicit) target areas KNA1.&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;P&gt;&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>Sat, 21 Apr 2007 12:31:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544711#M247821</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-04-21T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544712#M247822</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;I agree all above, and know that if  we use    "  * from"   , then it will crate buffer and store the selected data in the buffer tempararily.&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;sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Apr 2007 12:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/1544712#M247822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-21T12:37:45Z</dc:date>
    </item>
  </channel>
</rss>

