<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/6623414#M1440759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello , &lt;/P&gt;&lt;P&gt;I am developing rapport  in release 6.0. &lt;/P&gt;&lt;P&gt;On the screen I have two parameters _par1 and _par2 &lt;/P&gt;&lt;P&gt;I db table I have several entries with  values in field1 and field2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1         field2 &lt;/P&gt;&lt;P&gt;1                 2 &lt;/P&gt;&lt;P&gt;3                 4 &lt;/P&gt;&lt;P&gt;5                 6 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If on selection screen I enter value only  in _par1 and NOT in _par2 I do not get any &lt;/P&gt;&lt;P&gt;records in i_tab . So I enter "1 "in _par1 and nothing in _par2 and  I get nothing  i itab &lt;/P&gt;&lt;P&gt;I would  expect first row from  db_tab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with OR in where condition with  value " 1 "in _par1 and NO values in _par2 ,  and than &lt;/P&gt;&lt;P&gt;I get ALL  entries from db table in i_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how I can get ,for example , first row of db_table in itab &lt;/P&gt;&lt;P&gt;if user do not enter any value in _par2 ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source code . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from  db_tab &lt;/P&gt;&lt;P&gt;   into corresponding fields of table  Itab &lt;/P&gt;&lt;P&gt;           where   field1 eq _par1 and &lt;/P&gt;&lt;P&gt;                   field2 eq _par2  .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2010 13:50:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-03T13:50:45Z</dc:date>
    <item>
      <title>Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/6623414#M1440759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello , &lt;/P&gt;&lt;P&gt;I am developing rapport  in release 6.0. &lt;/P&gt;&lt;P&gt;On the screen I have two parameters _par1 and _par2 &lt;/P&gt;&lt;P&gt;I db table I have several entries with  values in field1 and field2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1         field2 &lt;/P&gt;&lt;P&gt;1                 2 &lt;/P&gt;&lt;P&gt;3                 4 &lt;/P&gt;&lt;P&gt;5                 6 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If on selection screen I enter value only  in _par1 and NOT in _par2 I do not get any &lt;/P&gt;&lt;P&gt;records in i_tab . So I enter "1 "in _par1 and nothing in _par2 and  I get nothing  i itab &lt;/P&gt;&lt;P&gt;I would  expect first row from  db_tab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with OR in where condition with  value " 1 "in _par1 and NO values in _par2 ,  and than &lt;/P&gt;&lt;P&gt;I get ALL  entries from db table in i_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how I can get ,for example , first row of db_table in itab &lt;/P&gt;&lt;P&gt;if user do not enter any value in _par2 ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source code . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from  db_tab &lt;/P&gt;&lt;P&gt;   into corresponding fields of table  Itab &lt;/P&gt;&lt;P&gt;           where   field1 eq _par1 and &lt;/P&gt;&lt;P&gt;                   field2 eq _par2  .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 13:50:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/6623414#M1440759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T13:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/6623415#M1440760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Declare the parameters as select-options and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options: s_par1 for db-par1,
                         s_par2 for db-par2.

select * from db_tab 
into corresponding fields of table Itab 
where field1 in s_par1 and 
field2 in s_par2 .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Please use a meaningful subject line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 13:56:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/6623415#M1440760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-03T13:56:29Z</dc:date>
    </item>
  </channel>
</rss>

