<?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 with the WHERE condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543649#M578295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narayana,&lt;/P&gt;&lt;P&gt;view this code and use like instead of IN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_SFLIGHT LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SFLIGHT INTO TABLE T_SFLIGHT WHERE CARRID = 'AZ' AND&lt;/P&gt;&lt;P&gt;CONNID IN ('0555', '0790') AND FLDATE LIKE '2004%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_SFLIGHT.&lt;/P&gt;&lt;P&gt;WRITE: /,T_SFLIGHT-CARRID,T_SFLIGHT-CONNID.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful rewrad me with points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Sanket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2007 11:41:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-23T11:41:57Z</dc:date>
    <item>
      <title>Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543643#M578289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;I have some problem with the where condition.&lt;/P&gt;&lt;P&gt;Within the method of my Class, I have written a select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table TAB1 into table lt_TAB1 where FIELD1 = ls_STRUCTURE-FIELD1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here ls_STRUCTURE is getting filled in the method based on the screen fields. The User enters * in the screen field FIELD1, then this query doesnt work. How to modify the query so that this works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543643#M578289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T10:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543644#M578290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;id do a ranges table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you leave a value blank in a where condition you will always get zero records.&lt;/P&gt;&lt;P&gt;if you have 0 entires in a ranges table your select will get you ALL records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using ranges tables (same as Select options) you have to use the WHERE IN statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:48:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543644#M578290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T10:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543645#M578291</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;Is TAB1 is Internal table or Database table. If the TAB1 is internal table then you should not use Select * then you need to use either Read table or the Loop at TAB1 statements. And in where condition pass a variable instead of giving strucutre field. decalare a varialbl then assign the value of ls_STRUCTURE-FIELD1 to varaible &amp;amp; pass it. e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variable = ls_STRUCTURE-FIELD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table TAB1 into table lt_TAB1 where FIELD1 = varaible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;Loop at  TAB1 where FIELD1 = varaible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endlloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashvender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:52:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543645#M578291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T10:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543646#M578292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if  ls_STRUCTURE-FIELD1 eq '*'.&lt;/P&gt;&lt;P&gt;  concatenate ls_STRUCTURE-FIELD1 '%' into ls_STRUCTURE-FIELD1.&lt;/P&gt;&lt;P&gt;   select * from table TAB1 into table lt_TAB1 where FIELD1 &amp;lt;b&amp;gt;like&amp;lt;/b&amp;gt; ls_STRUCTURE-FIELD1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; select * from table TAB1 into table lt_TAB1 where FIELD1 = ls_STRUCTURE-FIELD1. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543646#M578292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T10:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543647#M578293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do like this..&lt;/P&gt;&lt;P&gt;ranges : rfield1 for ls_STRUCTURE-FIELD1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rfield1-low = ls_STRUCTURE-FIELD1.&lt;/P&gt;&lt;P&gt;rfield1-sign = 'I'.&lt;/P&gt;&lt;P&gt;if ls_STRUCTURE-FIELD1 ca '*'.&lt;/P&gt;&lt;P&gt;rfield1-option = 'CP'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;rfield1-option = 'EQ'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;select * from table TAB1 into table lt_TAB1 where FIELD1 in rfield1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543647#M578293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T10:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543648#M578294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Narayana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    plz check the table with that entry (*). if it is existing then it will true.otherwise it is false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Pesi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 10:58:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543648#M578294</guid>
      <dc:creator>former_member772790</dc:creator>
      <dc:date>2007-07-23T10:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543649#M578295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narayana,&lt;/P&gt;&lt;P&gt;view this code and use like instead of IN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_SFLIGHT LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SFLIGHT INTO TABLE T_SFLIGHT WHERE CARRID = 'AZ' AND&lt;/P&gt;&lt;P&gt;CONNID IN ('0555', '0790') AND FLDATE LIKE '2004%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_SFLIGHT.&lt;/P&gt;&lt;P&gt;WRITE: /,T_SFLIGHT-CARRID,T_SFLIGHT-CONNID.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful rewrad me with points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Sanket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 11:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543649#M578295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T11:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543650#M578296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks all for the reply. &lt;/P&gt;&lt;P&gt;The problem is solved. I used the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lt_search2 type  &lt;/P&gt;&lt;P&gt;               comt_prsearch_sel_option_tab,&lt;/P&gt;&lt;P&gt;      ls_search2 type &lt;/P&gt;&lt;P&gt;               comt_prsearch_sel_option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_search2-low = ls_structure-FIELD1. &lt;/P&gt;&lt;P&gt;ls_search2-sign = 'I'.&lt;/P&gt;&lt;P&gt;if ls_structure-FIELD1 ca '*'.&lt;/P&gt;&lt;P&gt;   ls_search2-option = 'CP'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   ls_search2-option = 'EQ'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append ls_search2 to lt_search2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 04:18:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-the-where-condition/m-p/2543650#M578296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-24T04:18:13Z</dc:date>
    </item>
  </channel>
</rss>

