<?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: regarding select single in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279414#M496159</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;You cant put table statement in select single, u can fetch the data to itab header or explicit work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * into itab from mara where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;select single * into wa from mara where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;Reward if helpful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2007 12:31:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-15T12:31:22Z</dc:date>
    <item>
      <title>regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279404#M496149</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;&lt;/P&gt;&lt;P&gt;            cud u plz tell me how to use select single statement can i use it to populat the internal  table with header and body or only header,plz explain with the eg...thnx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279404#M496149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279405#M496150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select single will fetch only one record , in your terms it will fill only the header of internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single matnr from mara into it_mara-matnr where matnr eq 'XXXXX'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:19:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279405#M496150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279406#M496151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When you do the select single, Header and the Body will filled up with a single record, the header record and the Body record will be same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:20:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279406#M496151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279407#M496152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tables: mara. " here mara is only work area. You can take it as ONLY HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM MARA&lt;/P&gt;&lt;P&gt; where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  t_mara like table of mara with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM MARA&lt;/P&gt;&lt;P&gt;into t_mara&lt;/P&gt;&lt;P&gt; where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both the cases only the result will be populated into HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not the table BODY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So  finally we have to use work area to get the select single output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general we will use this in VALIDATION cases. I mean to check the data is there in table for the specified ranges of values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:21:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279407#M496152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279408#M496153</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 SINGLE: &lt;/P&gt;&lt;P&gt;1. Select single is based on PRIMARY KEY&lt;/P&gt;&lt;P&gt;2. It will take the first record directly without searching of all relevant records.(Though you have lot of records for given condition)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:22:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279408#M496153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279409#M496154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;           Select single is used for fetching only one value.&lt;/P&gt;&lt;P&gt;If any single value found .sy-subrc becomes zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;with out header.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Select  single matnr into w_area from mara where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;append w_area to itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with header.&lt;/P&gt;&lt;P&gt;Select  single matnr into table itab from mara where matnr in s_matnr.&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;Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279409#M496154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279410#M496155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;As it selects only one record at a time its not possible to directly insert into internal table's body. First select record into work area(headerline) then append it to internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA wa TYPE spfli. &lt;/P&gt;&lt;P&gt;SELECT SINGLE carrid connid cityfrom cityto &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF wa &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       WHERE carrid EQ 'LH' AND connid EQ '0400'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Younus&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward Helpful Answers!!!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:25:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279410#M496155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279411#M496156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best way to find out is through sql trace or runtime analysis.&lt;/P&gt;&lt;P&gt;The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.&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;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279411#M496156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279412#M496157</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 Single for only feching the data base tables then u can transfer to internal table. then u have to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ table tablename with key Primary key where value = internable value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in ur case only it will header value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is solve ur problem give me points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:26:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279412#M496157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279413#M496158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ravi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Select single is the syntax you use when you want to select a single record from the database . you can use  it to populat the internal table with header and body or without header line .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you go with a sample prog ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST03.&lt;/P&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      matnr like mara-matnr ,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select single * from mara&lt;/P&gt;&lt;P&gt;                  into CORRESPONDING FIELDS OF itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       write: itab-matnr.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps !&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;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279413#M496158</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-05-15T12:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279414#M496159</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;You cant put table statement in select single, u can fetch the data to itab header or explicit work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * into itab from mara where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;select single * into wa from mara where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;Reward if helpful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279414#M496159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select single</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279415#M496160</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;internal table without headerline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from  table itab_mara into wa_mara where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal table with headerline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from table itab_mara where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2007 12:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-single/m-p/2279415#M496160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-15T12:38:37Z</dc:date>
    </item>
  </channel>
</rss>

