<?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 query problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-problem/m-p/4638605#M1091994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest building the query from just one WHERE statement and then re-test by adding in the extra criteria. By doing this you should notice yourself which particular field is causing the problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. start with this, then build up the statement until it stops working as expected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM zfmm_sd51_audit&lt;/P&gt;&lt;P&gt;INTO TABLE it_final&lt;/P&gt;&lt;P&gt;WHERE ( zidocno = zfmm_sd51_audit-zidocno ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2008 14:26:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-22T14:26:43Z</dc:date>
    <item>
      <title>select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-problem/m-p/4638604#M1091993</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 have developed a module pool and i use the below query in it. ZFMM_SD51_AUDIT is the table that i created and i am fetching the data from it.&lt;/P&gt;&lt;P&gt;The problem is when i input this data for idocno in selection, it gives me no records from this query although there is a record to the idocno in the table. And when i replace AND with OR in the query it gives me all the records in the table. While debugging i see the record does get shown as input into the selection field but the internal table does not show 1 record as is in the table. Its really confusing whats goin wrong? Is there any sort of setting i need to do for this in the dictionary table or there some other way also for writing the query. &lt;/P&gt;&lt;P&gt;Can any one help on this? &lt;/P&gt;&lt;P&gt;Would appreciate your responses or suggestions. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;    FROM zfmm_sd51_audit&lt;/P&gt;&lt;P&gt;    INTO TABLE it_final&lt;/P&gt;&lt;P&gt;    WHERE  ( zidocno        = zfmm_sd51_audit-zidocno OR zidocno  = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( zqmnum         = zfmm_sd51_audit-zqmnum  OR zqmnum   = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( zuser_name     = zfmm_sd51_audit-zuser_name OR zuser_name = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( ( zresolved_date BETWEEN s_date1-low AND s_date1-high ) OR zresolved_date = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( ( zresolved_time BETWEEN s_time1-low AND s_time1-high ) OR zresolved_time = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( ( zrdate BETWEEN s_date-low AND s_date-high ) OR zrdate = c_space )&lt;/P&gt;&lt;P&gt;    AND    ( ( zrtime BETWEEN s_time-low AND s_time-high )  OR zrtime = c_space ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saurabh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 13:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-problem/m-p/4638604#M1091993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: select query problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-problem/m-p/4638605#M1091994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest building the query from just one WHERE statement and then re-test by adding in the extra criteria. By doing this you should notice yourself which particular field is causing the problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. start with this, then build up the statement until it stops working as expected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM zfmm_sd51_audit&lt;/P&gt;&lt;P&gt;INTO TABLE it_final&lt;/P&gt;&lt;P&gt;WHERE ( zidocno = zfmm_sd51_audit-zidocno ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 14:26:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-problem/m-p/4638605#M1091994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T14:26:43Z</dc:date>
    </item>
  </channel>
</rss>

