<?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 select statement fails... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381812#M1042409</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 a subscreen with 4 select options..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_ONE&lt;/P&gt;&lt;P&gt;S_TWO&lt;/P&gt;&lt;P&gt;S_THREE&lt;/P&gt;&lt;P&gt;S_FOUR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I write a select statement with inner join  on two tables based on field XXX. And the data to be retrieved is based on the values entered in these select options..&lt;/P&gt;&lt;P&gt;so my statement is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT TAB1&lt;SUB&gt;AAA, TAB1&lt;/SUB&gt;BBB, TAB1&lt;SUB&gt;CCC, TAB1&lt;/SUB&gt;DDD INTO CORRESPONDING FIELDS OF ITAB FROM TAB1 INNER JOIN TAB2 ON TAB1&lt;SUB&gt;XXX = TAB2&lt;/SUB&gt;XXX&lt;/P&gt;&lt;P&gt;AND AAA IN S_ONE AND BBB IN S_TWO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I dont enter any values in these select options, so by default all the records must be retrieved isn't it ? I have records in bothe TAB1 and related records in TAB2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I dont get any records and sy-subrc is returning value of 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2008 17:22:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-18T17:22:03Z</dc:date>
    <item>
      <title>select statement fails...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381812#M1042409</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 a subscreen with 4 select options..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_ONE&lt;/P&gt;&lt;P&gt;S_TWO&lt;/P&gt;&lt;P&gt;S_THREE&lt;/P&gt;&lt;P&gt;S_FOUR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I write a select statement with inner join  on two tables based on field XXX. And the data to be retrieved is based on the values entered in these select options..&lt;/P&gt;&lt;P&gt;so my statement is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT TAB1&lt;SUB&gt;AAA, TAB1&lt;/SUB&gt;BBB, TAB1&lt;SUB&gt;CCC, TAB1&lt;/SUB&gt;DDD INTO CORRESPONDING FIELDS OF ITAB FROM TAB1 INNER JOIN TAB2 ON TAB1&lt;SUB&gt;XXX = TAB2&lt;/SUB&gt;XXX&lt;/P&gt;&lt;P&gt;AND AAA IN S_ONE AND BBB IN S_TWO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I dont enter any values in these select options, so by default all the records must be retrieved isn't it ? I have records in bothe TAB1 and related records in TAB2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I dont get any records and sy-subrc is returning value of 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 17:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381812#M1042409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T17:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: select statement fails...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381813#M1042410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using a WHERE Clause  instead of:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND AAA IN S_ONE AND BBB IN S_TWO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 17:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381813#M1042410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T17:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: select statement fails...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381814#M1042411</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;As long as the conditions AAA IN S_ONE AND BBB IN S_TWO aren't affecting the JOIN, you've got to put it in a WHERE clause. and don't forget to specify table names.&lt;/P&gt;&lt;P&gt;Your select will look like :&lt;/P&gt;&lt;P&gt; SELECT TAB1&lt;SUB&gt;AAA, TAB1&lt;/SUB&gt;BBB, TAB1&lt;SUB&gt;CCC, TAB1&lt;/SUB&gt;DDD &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF ITAB &lt;/P&gt;&lt;P&gt;FROM TAB1 INNER JOIN TAB2 ON TAB1&lt;SUB&gt;XXX = TAB2&lt;/SUB&gt;XXX&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE&lt;/STRONG&gt;    &lt;STRONG&gt;TAB1~&lt;/STRONG&gt; AAA IN S_ONE    AND    &lt;STRONG&gt;TAB1~&lt;/STRONG&gt; BBB IN S_TWO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Younes BOUAOUAD on Aug 18, 2008 5:34 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 17:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-fails/m-p/4381814#M1042411</guid>
      <dc:creator>younes_bouaouad</dc:creator>
      <dc:date>2008-08-18T17:33:58Z</dc:date>
    </item>
  </channel>
</rss>

