<?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 from table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572091#M859810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your where statement you are checking 1 field with 2 different select options (DISPO).  Just put both selections in the same select option.  (or perhaps you meant to check 2 different fields&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2008 16:31:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-28T16:31:39Z</dc:date>
    <item>
      <title>SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572089#M859808</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;&lt;/P&gt;&lt;P&gt;I have the following SELECT to get data from a ztable . I checked the table for the same criteria and there is data . Any idea why it is returning with SY-SUBRC = 4 ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_DISP and S_DISP1 are the 2 diff selection criteria on the same selection screen . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also checked there is data in T_NORMT with plan plate .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Teresa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Loop at t_normt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT  WERKS&lt;/P&gt;&lt;P&gt;          MATNR&lt;/P&gt;&lt;P&gt;          BUILDING_I&lt;/P&gt;&lt;P&gt;          NORMT&lt;/P&gt;&lt;P&gt;          DISPO&lt;/P&gt;&lt;P&gt;          z1&lt;/P&gt;&lt;P&gt;          z2&lt;/P&gt;&lt;P&gt;     FROM ztable&lt;/P&gt;&lt;P&gt;     INTO TABLE itab&lt;/P&gt;&lt;P&gt;     WHERE ZWERKS = P_PWWRK&lt;/P&gt;&lt;P&gt;       AND NORMT = T_NORMT-NORMT&lt;/P&gt;&lt;P&gt;       AND BUILDING_I = P_BLDGI&lt;/P&gt;&lt;P&gt;       AND DISPO IN S_DISP&lt;/P&gt;&lt;P&gt;       AND DISPO IN S_DISP1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572089#M859808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T16:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572090#M859809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use select single * or select upto 1 row inside the loop end loop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572090#M859809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T16:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572091#M859810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your where statement you are checking 1 field with 2 different select options (DISPO).  Just put both selections in the same select option.  (or perhaps you meant to check 2 different fields&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572091#M859810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572092#M859811</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;AND DISPO IN S_DISP&lt;/P&gt;&lt;P&gt;AND DISPO IN S_DISP1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND DISPO IN S_DISP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt; DISPO IN S_DISP1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:33:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572092#M859811</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-03-28T16:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572093#M859812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to test the select statement before looping. Also, check by testing where condition in your select statement individually.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;siddu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572093#M859812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T16:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572094#M859813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though I am checking for the same field DISPO . I need to check against 2 different selections S_DISP1 and S_DISP on the selection screen . How do I combine them ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572094#M859813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T16:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572095#M859814</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;The problem is with the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because you are comparing the field dispo with s_disp and s_disp1, the condition gets false eventhough the data exists in the table. Because you are using &lt;STRONG&gt;AND&lt;/STRONG&gt; the dispo value at the same time cannot hold two values from two fields i.e. at a any particular instance the dispo field should contain both the values from s_disp and s_disp1 if you use &lt;STRONG&gt;AND&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;If you use &lt;STRONG&gt;OR&lt;/STRONG&gt; then you will get both the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember that for &lt;STRONG&gt;AND&lt;/STRONG&gt; both the s_disp and s_disp1 must have same values to satisfy condition.&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;OR&lt;/STRONG&gt; either s_disp or s_disp1 can have values.&lt;/P&gt;&lt;P&gt;Inorder to get single record using or, use select single stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ammavajjala Narayana on Mar 28, 2008 6:03 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ammavajjala Narayana on Mar 28, 2008 6:05 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 28, 2008 6:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 17:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572095#M859814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572096#M859815</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 multiple select option, it may solve u'r problem.&lt;/P&gt;&lt;P&gt;there is extension box , use that to give u'r two selection ctiteria's&lt;/P&gt;&lt;P&gt;don't use wo select options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;chandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 17:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-table/m-p/3572096#M859815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T17:42:07Z</dc:date>
    </item>
  </channel>
</rss>

