<?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 quiry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891808#M373226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh , &lt;/P&gt;&lt;P&gt;  Create a range and fill it with values like &lt;/P&gt;&lt;P&gt;'%452' to get all cost centers that end with 452 and in similar way for your all other cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this range in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2007 03:56:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-02T03:56:57Z</dc:date>
    <item>
      <title>Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891805#M373223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to restrict values to specific cost centers. I need to pick up all cost centers that end with '452' and cost centers that end with '470' .  I also need all cost centers that end with numbers between '452' and '470'.&lt;/P&gt;&lt;P&gt;example of Cost Center: 100VT452&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 02:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891805#M373223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T02:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891806#M373224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt; U can do something like this. First select all the entries from DB table. And then filter that which ur criteria. Something like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : kostl type kmzei-kostl,&lt;/P&gt;&lt;P&gt;       itab type standard table of kmzei with header line,&lt;/P&gt;&lt;P&gt;       itab1 type standard table of kmzei with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : cost_center type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from kmzei into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; cost_center = itab-kostl+7(3).&lt;/P&gt;&lt;P&gt; if cost_center &amp;gt;= 452 and cost_center &amp;lt;= 470.&lt;/P&gt;&lt;P&gt;  move itab to itab1.&lt;/P&gt;&lt;P&gt;  append itab1.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; write : / itab1-kostl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-SatyaPriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 03:27:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891806#M373224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T03:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891807#M373225</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 100VT is common in all the cost centersthat you want then you can easily get it by creating an internal table of these values like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab type table of cost_center_type,&lt;/P&gt;&lt;P&gt;          wa_cost type cost_center_type.&lt;/P&gt;&lt;P&gt;DO 18 times.&lt;/P&gt;&lt;P&gt;DATA: str type string,&lt;/P&gt;&lt;P&gt;           number type I value 452.&lt;/P&gt;&lt;P&gt;concatenate '100VT' number into str.&lt;/P&gt;&lt;P&gt;wa_cost = str.&lt;/P&gt;&lt;P&gt;append wa_cost to itab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use this itab in SELECT quey WHERE IN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '%' number into str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And to find out cost center that end with say 452 you need to do SELECT WHERE cost center LIKE str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 03:48:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891807#M373225</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-02-02T03:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891808#M373226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh , &lt;/P&gt;&lt;P&gt;  Create a range and fill it with values like &lt;/P&gt;&lt;P&gt;'%452' to get all cost centers that end with 452 and in similar way for your all other cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this range in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 03:56:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891808#M373226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T03:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891809#M373227</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;Select * from db into table itab where kostl like '%452' or kostl like '%470'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 04:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891809#M373227</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-02-02T04:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891810#M373228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;You can do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single kostl&lt;/P&gt;&lt;P&gt;     from &amp;lt;DB table&amp;gt;&lt;/P&gt;&lt;P&gt;     into lv_kostl_452&lt;/P&gt;&lt;P&gt;     where kostl like '%452'.&lt;/P&gt;&lt;P&gt;this will give you the first one of type .......452&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly the same u can do for 470 to select into lv_kostl_470&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u can create a range like this 'I BT lv_kostl_452 lv_kostl_470' say this range be lv_range&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so your select query now you can write is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select kostl&lt;/P&gt;&lt;P&gt;     from &amp;lt;DB table&amp;gt;&lt;/P&gt;&lt;P&gt;     into table &amp;lt;int table&amp;gt;&lt;/P&gt;&lt;P&gt;     where kostl in lv_range&lt;/P&gt;&lt;P&gt;           or kostl like %470.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will do it.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2007 04:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891810#M373228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-02T04:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891811#M373229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Use the where condition similar to Oracle/Sql query.&lt;/P&gt;&lt;P&gt;Select f1 f2 into table int_tab1 from tbl1&lt;/P&gt;&lt;P&gt;  where kostl like '%452'&lt;/P&gt;&lt;P&gt;      or kostl like '%470'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Feb 2007 04:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891811#M373229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-03T04:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select quiry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891812#M373230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahseh,&lt;/P&gt;&lt;P&gt; Please read this......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Comparing Strings&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To find out whether the value of a column matches a pattern, use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ... WHERE &amp;lt;s&amp;gt; [NOT ] LIKE &amp;lt;f&amp;gt; [ESCAPE &amp;lt;h&amp;gt;] ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition is true if the value of the column &amp;lt;s&amp;gt; matches [does not match] the pattern in the data object &amp;lt;f&amp;gt;. You can only use this test for text fields. The data type of the column must be alphanumeric. &amp;lt;f&amp;gt; must have data type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following wildcard characters in &amp;lt;f&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;% for a sequence of any characters (including spaces). &lt;/P&gt;&lt;P&gt;_ for a single character.&lt;/P&gt;&lt;P&gt;For example, ABC_EFG% matches the strings ABCxEFGxyz and ABCxEFG, but not ABCEFGxyz. If you want to use the two wildcard characters explicitly in the comparison, use the ESCAPE option. ESCAPE &amp;lt;h&amp;gt; specifies an escape symbol &amp;lt;h&amp;gt;. If preceded by &amp;lt;h&amp;gt;, the wildcards and the escape symbol itself lose their usual function within the pattern &amp;lt;f&amp;gt;. The use of _ and % corresponds to Standard SQL usage. Logical expressions elsewhere in ABAP use other wildcard characters (+ and *).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use LIKE in the ON condition of the FROM clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Feb 2007 05:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-quiry/m-p/1891812#M373230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-03T05:04:46Z</dc:date>
    </item>
  </channel>
</rss>

