<?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/2458880#M551556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you must use select.  But you can also minmize the data retreival by specifying a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: wa_ebeln type ekko-ebeln.

clear wa_ebeln.
select single ebeln into wa_ebeln
         where ebeln = wa_pono and 
                   ebelp = wa_poitem.
if sy-subrc = 0
perform found.
else.
perform not found.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2007 00:24:39 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-07-02T00:24:39Z</dc:date>
    <item>
      <title>select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458879#M551555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;may i know if i just want to check if the entry is exist (not to get the data from database table), say ekko,&lt;/P&gt;&lt;P&gt;can i write as below? i must use select? i must have if statement to check sy-subrc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * where ebeln = wa_pono and &lt;/P&gt;&lt;P&gt;                               ebelp = wa_poitem.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;perform found.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;perform not found.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 00:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458879#M551555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T00:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458880#M551556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you must use select.  But you can also minmize the data retreival by specifying a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: wa_ebeln type ekko-ebeln.

clear wa_ebeln.
select single ebeln into wa_ebeln
         where ebeln = wa_pono and 
                   ebelp = wa_poitem.
if sy-subrc = 0
perform found.
else.
perform not found.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 00:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458880#M551556</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-02T00:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458881#M551557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eliana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use the 'Select count(*)' variant which does not need you to retrieve any field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 00:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458881#M551557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T00:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458882#M551558</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 can use the select * &lt;/P&gt;&lt;P&gt;                select single&lt;/P&gt;&lt;P&gt;for ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SPFLI&lt;/P&gt;&lt;P&gt;         WHERE&lt;/P&gt;&lt;P&gt;           CITYFROM = 'FRANKFURT' AND&lt;/P&gt;&lt;P&gt;           CITYTO   = 'NEW YORK'.&lt;/P&gt;&lt;P&gt;  WRITE: / SPFLI-CARRID, SPFLI-CONNID.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SFLIGHT.&lt;/P&gt;&lt;P&gt;DATA   SEATSFREE TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM SFLIGHT&lt;/P&gt;&lt;P&gt;                WHERE&lt;/P&gt;&lt;P&gt;                  CARRID   = 'LH '      AND&lt;/P&gt;&lt;P&gt;                  CONNID   = '0400'     AND&lt;/P&gt;&lt;P&gt;                  FLDATE   = '19950228'.&lt;/P&gt;&lt;P&gt;SEATSFREE = SFLIGHT-SEATSMAX - SFLIGHT-SEATSOCC.&lt;/P&gt;&lt;P&gt;WRITE: / SFLIGHT-CARRID, SFLIGHT-CONNID,&lt;/P&gt;&lt;P&gt;         SFLIGHT-FLDATE, SEATSFREE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use following return code in your program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0 At least one line was read. &lt;/P&gt;&lt;P&gt;SY_SUBRC = 4 No lines were read. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8 The search key was not fully qualified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;*************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 04:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458882#M551558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T04:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458883#M551559</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;In select statement, you need to specify the database table name.&lt;/P&gt;&lt;P&gt;data v_ebeln type ebeln.&lt;/P&gt;&lt;P&gt;select single ebeln into v_ebeln from &amp;lt;b&amp;gt;EKBE&amp;lt;/b&amp;gt; where ebeln = wa_pono and &lt;/P&gt;&lt;P&gt;ebelp = wa_poitem.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;perform found.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;perform not found.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 04:31:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458883#M551559</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-07-02T04:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458884#M551560</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;your query should have DB table name.&lt;/P&gt;&lt;P&gt;select single * from ekpo where ebeln = wa_pono and &lt;/P&gt;&lt;P&gt;ebelp = wa_poitem.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;perform found.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;perform not found.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&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>Mon, 02 Jul 2007 04:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458884#M551560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T04:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458885#M551561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elina,&lt;/P&gt;&lt;P&gt;    Your view is correct but you should modify your coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select single * where ebeln = wa_pono and ebelp = wa_poitem.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;perform found.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;perform notfound.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form found.&lt;/P&gt;&lt;P&gt;Write: 'The record is found'.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form notfound.&lt;/P&gt;&lt;P&gt;Write: 'The record is not found'.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF HELPFULL REWARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458885#M551561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458886#M551562</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;refer this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_ebeln type ekko-ebeln.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;clear it_ebeln.&lt;/P&gt;&lt;P&gt;select single ebeln into it_ebeln&lt;/P&gt;&lt;P&gt;         where ebeln = it_ebeln-pono and &lt;/P&gt;&lt;P&gt;                   ebelp = it_ebeln-poitem.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;perform found.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;perform not found.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/2458886#M551562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:06:37Z</dc:date>
    </item>
  </channel>
</rss>

