<?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 not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794774#M1466487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If s_client is your select-options in ur selection u can directly use that in query &lt;/P&gt;&lt;P&gt;whithout populating the range table (r_client). Code given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where type = '2' &lt;/P&gt;&lt;P&gt;and partner in s_client. This will populate the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajeswari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Mar 2010 11:49:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-24T11:49:46Z</dc:date>
    <item>
      <title>Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794766#M1466479</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;Im using this select query in my RFC:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where  type = '2' and partner in r_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where r_client is a range having values for diffrent partners. Issue is when there is no value in r_client query is not returning any record. ideally it should return records based on condition "type = 2". can anybody help me in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Sudhanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794766#M1466479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794767#M1466480</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;When you are using the select query as you are using then the selection will be based on type = '2' and partner in r_client as you have given AND. Instead you can give an IF condition and check whether the r_client is not initial then use the select query&lt;/P&gt;&lt;P&gt;select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where type = '2' and partner in r_client  and in case id r_client is initial use select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where type = '2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Midhun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:31:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794767#M1466480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794768#M1466481</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;Infact that is my problem. I have 5 more fields in selection screen and can't just put so many IFs. ideally it should not consider r_client if there is no value in this and retieve records based on "type" only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;sudhanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794768#M1466481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794769#M1466482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you building the range table r_client? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794769#M1466482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794770#M1466483</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;Just modify the querry as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where type = '2'  * or * partner in r_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pravin s. on Mar 24, 2010 11:40 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:40:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794770#M1466483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794771#M1466484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;   just check the type of r_client and the partner in the debug mode.&lt;/P&gt;&lt;P&gt;  and also just give the select query as select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where  partner in r_client and type = '2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Midhun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794771#M1466484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794772#M1466485</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;Here is the way im using ranges:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_client for BUT000-PARTNER.&lt;/P&gt;&lt;P&gt;r_client-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_client-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_client-low = s_client_low.&lt;/P&gt;&lt;P&gt;r_client-high = s_client_high.&lt;/P&gt;&lt;P&gt;append r_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;sudhanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794772#M1466485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T10:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794773#M1466486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you could do something like this and check,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ranges: r_client for BUT000-PARTNER.

if not s_client[] is initial.
r_client-sign = 'I'.
r_client-option = 'EQ'.
r_client-low = s_client_low.
r_client-high = s_client_high.
append r_client.
else.
r_client-sign = 'I'.
r_client-option = 'CP'.
r_client-low = '*'.
append r_client.
endif.
&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 11:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794773#M1466486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T11:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794774#M1466487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If s_client is your select-options in ur selection u can directly use that in query &lt;/P&gt;&lt;P&gt;whithout populating the range table (r_client). Code given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;field list&amp;gt; from but000 into table IT_but000 where type = '2' &lt;/P&gt;&lt;P&gt;and partner in s_client. This will populate the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajeswari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 11:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794774#M1466487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T11:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select query not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794775#M1466488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhanshu,&lt;/P&gt;&lt;P&gt;  You may try the following code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ranges: r_client for BUT000-PARTNER.
If s_client[] is not initial.
r_client-sign    = 'I'.
r_client-option = 'EQ'.
r_client-low    = s_client-low.         "Hope you have put S_CLIENT-LOW instead of S_CLIENT_LOW
r_client-high   = s_client-high.
append r_client.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ranjith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 11:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-not-working/m-p/6794775#M1466488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T11:50:51Z</dc:date>
    </item>
  </channel>
</rss>

