<?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: problem is select query. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874911#M1323915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;    Try this&lt;/P&gt;&lt;P&gt;If checkbox1 = 'X' or checkbox2 = 'X' or checkbox3 = 'X'.&lt;/P&gt;&lt;P&gt;move value of field in variable V1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;   select abc&lt;/P&gt;&lt;P&gt;               xyz &lt;/P&gt;&lt;P&gt;     from table&lt;/P&gt;&lt;P&gt;    into itab&lt;/P&gt;&lt;P&gt;   where field eq V1.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2009 05:28:24 GMT</pubDate>
    <dc:creator>viquar_iqbal</dc:creator>
    <dc:date>2009-07-10T05:28:24Z</dc:date>
    <item>
      <title>problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874907#M1323911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SDNites,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a req where I need to use select query to fetch data. But the conditions which is to be placed in this select query has 3 checkboxes corresponding to the same field. Either of them can be selected at a time. Please let me know how can we put this condition effectively in one select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:16:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874907#M1323911</guid>
      <dc:creator>itabhishek9</dc:creator>
      <dc:date>2009-07-10T05:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874908#M1323912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF CHECKBOX 1 IS SELECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE THE SELECT ACCORDING TO THAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF CHECKBOX 2 IS SELECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE THE SELECT ACCORDING TO THAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF CHECKBOX 3 IS SELECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE THE SELECT ACCORDING TO THAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874908#M1323912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T05:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874909#M1323913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u please explain the problem in a better way. What is the data u need to select and what are the check boxes are they on the selection-screen....?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874909#M1323913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T05:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874910#M1323914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I explain my issue in a more detailed manner,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a 3 check boxes in my selection screen. All of them correponds to the the same field(Customer status).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My select query req is to fetch the data for the checkbox which is selected. At a time 1 checkbox can be selected, or 2 or 3(in any combination).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Is there any way to fulfill this req in a single select query. If not then 7 select queries need to be used to fulfill this req.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874910#M1323914</guid>
      <dc:creator>itabhishek9</dc:creator>
      <dc:date>2009-07-10T05:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874911#M1323915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;    Try this&lt;/P&gt;&lt;P&gt;If checkbox1 = 'X' or checkbox2 = 'X' or checkbox3 = 'X'.&lt;/P&gt;&lt;P&gt;move value of field in variable V1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;   select abc&lt;/P&gt;&lt;P&gt;               xyz &lt;/P&gt;&lt;P&gt;     from table&lt;/P&gt;&lt;P&gt;    into itab&lt;/P&gt;&lt;P&gt;   where field eq V1.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874911#M1323915</guid>
      <dc:creator>viquar_iqbal</dc:creator>
      <dc:date>2009-07-10T05:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874912#M1323916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; If checkbox1 = 'X' or checkbox2 = 'X' or checkbox3 = 'X'.&lt;/P&gt;&lt;P&gt;&amp;gt; move value of field in variable V1.&lt;/P&gt;&lt;P&gt;&amp;gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMO There is no need to check with IF condition unless you think condition will always true.&lt;/P&gt;&lt;P&gt;And the Above IF condition will always true, which is really non-sense to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874912#M1323916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T05:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874913#M1323917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think u can do it by range table&lt;/P&gt;&lt;P&gt;Example- Suppose three checkbox are &lt;/P&gt;&lt;P&gt;1 Customer is active&lt;/P&gt;&lt;P&gt;2 Customer is inactive&lt;/P&gt;&lt;P&gt;3 Customer is blocked from trading&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the field correspond to these status is field1(suppose) in table KNA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranges: r_field1 for kna1-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Customer is active checkbox = 'X'.&lt;/P&gt;&lt;P&gt;r_field1-low = 1 (the value should be as same as mentioned in table kNA1 for this status)&lt;/P&gt;&lt;P&gt;r_field-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_field-sighn = 'I'.&lt;/P&gt;&lt;P&gt;append r_field.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform the same case for rest of two status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use it in below query as follows&lt;/P&gt;&lt;P&gt;select * from kna1 where field1 in r_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this wil help u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 05:40:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874913#M1323917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T05:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874914#M1323918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abhishek ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you  have a 3 check boxes in selection screen.  All of them correponds to the the same field(Customer status).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select query req is to fetch the data for the checkbox which is selected. but can you tell me  which value you are passing and to which column you are passing value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e if 1st chk box selected what you are passing  if two then what if three then what .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just tell me what you are passing and to which column you are passing . will give you good solution &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 06:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874914#M1323918</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2009-07-10T06:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874915#M1323919</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;This can be done by dynamic where condition;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : lv_condition(100) type C.

IF rad_button1 EQ 'X'.
lv_condition = 'Field = 10'.
ELSEIF  rad_button2 EQ 'X'.
lv_condition = 'Field = 20'.
ELSE.
lv_condition = 'Field = 30'.
ENDIF.

Select * into itab from db_tab Where ( lv_condition ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See F1 help for where condition for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 06:05:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874915#M1323919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T06:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem is select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874916#M1323920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on your check box selection u can concatenate the string for where ckause....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg:- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate `'` 'A' `'` into fs.&lt;/P&gt;&lt;P&gt;concatenate `'` 'F' `'` into fs1.&lt;/P&gt;&lt;P&gt;if cb1 = 'X' and CB2 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE  'bstyp' '='   FS  'OR' 'bstyp' '='  FS1  INTO FS SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from dbtab into table itab where (fs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depending on ur check box selection u can change ur VARIABLE FS to be used in where clause....... But u just need to use single select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 06:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-is-select-query/m-p/5874916#M1323920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-10T06:10:11Z</dc:date>
    </item>
  </channel>
</rss>

