<?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: wildcard selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267250#M1018218</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;Yes, definately we can have parameters in wild card selection query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for any character string *&lt;/P&gt;&lt;P&gt;for any single character +.&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 ... &lt;/P&gt;&lt;P&gt;WHERE s &lt;/P&gt;&lt;P&gt;LIKE f &lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;The condition is true if the value of the column s matches [does not match] the pattern in the data object f.You can only use this test for text fields. The data type of the column must be alphanumeric. f 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 f:&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;%&lt;/STRONG&gt; for a sequence of any characters (including spaces).&lt;/P&gt;&lt;P&gt;2.  &lt;STRONG&gt;_&lt;/STRONG&gt; for a single character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, ABC_EFG% matches the strings ABCxEFGxyz and ABCxEFG, but not ABCEFGxyz. The use of&lt;/P&gt;&lt;P&gt;_ and % corresponds to Standard SQL usage. Logical expressions elsewhere in ABAP use other&lt;/P&gt;&lt;P&gt;wildcard characters (+ and *).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: makt.

types: begin of ty_itab,
       matnr type makt-matnr,
       maktx type makt-maktx,
       end of ty_itab.

data: itab type standard table of ty_itab,
      wa_itab like line of itab,
      np_matnr type makt-matnr.

parameters: p_matnr type makt-matnr.

Concatenate p_matnr '%' into np_matnr.

select     matnr
           maktx
from       makt
into table itab
where matnr LIKE np_matnr.

loop at itab into wa_itab.

write: wa_itab-matnr.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;this will surely help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx,&lt;/P&gt;&lt;P&gt;dhanashri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:34 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:43 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2008 04:33:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-05T04:33:43Z</dc:date>
    <item>
      <title>wildcard selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267247#M1018215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have query on wildcard selection. Can we do it for parameter?&lt;/P&gt;&lt;P&gt;If can, kindly provide me the sample coding of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 03:40:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267247#M1018215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T03:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: wildcard selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267248#M1018216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We can use '%'  ex: that means %A ends with A, A% starts with A like this..&lt;/P&gt;&lt;P&gt;for comaparing we will use LIKE in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from sflight
into table it_flight
where carrid like '%A'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 03:43:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267248#M1018216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T03:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: wildcard selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267249#M1018217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kyra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_mara TYPE mara OCCURS 0.
  SELECT * FROM mara
  INTO TABLE it_mara
  WHERE matnr LIKE '%23'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 03:44:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267249#M1018217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T03:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: wildcard selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267250#M1018218</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;Yes, definately we can have parameters in wild card selection query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for any character string *&lt;/P&gt;&lt;P&gt;for any single character +.&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 ... &lt;/P&gt;&lt;P&gt;WHERE s &lt;/P&gt;&lt;P&gt;LIKE f &lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;The condition is true if the value of the column s matches [does not match] the pattern in the data object f.You can only use this test for text fields. The data type of the column must be alphanumeric. f 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 f:&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;%&lt;/STRONG&gt; for a sequence of any characters (including spaces).&lt;/P&gt;&lt;P&gt;2.  &lt;STRONG&gt;_&lt;/STRONG&gt; for a single character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, ABC_EFG% matches the strings ABCxEFGxyz and ABCxEFG, but not ABCEFGxyz. The use of&lt;/P&gt;&lt;P&gt;_ and % corresponds to Standard SQL usage. Logical expressions elsewhere in ABAP use other&lt;/P&gt;&lt;P&gt;wildcard characters (+ and *).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: makt.

types: begin of ty_itab,
       matnr type makt-matnr,
       maktx type makt-maktx,
       end of ty_itab.

data: itab type standard table of ty_itab,
      wa_itab like line of itab,
      np_matnr type makt-matnr.

parameters: p_matnr type makt-matnr.

Concatenate p_matnr '%' into np_matnr.

select     matnr
           maktx
from       makt
into table itab
where matnr LIKE np_matnr.

loop at itab into wa_itab.

write: wa_itab-matnr.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;this will surely help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx,&lt;/P&gt;&lt;P&gt;dhanashri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:34 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:43 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 5, 2008 6:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 04:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267250#M1018218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T04:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: wildcard selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267251#M1018219</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;wild card characters are used check whether the string start with particular char or ends with particuat char or field valur contains set of charsss wch are enclose between '%' symobles..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE also works..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is used in where clasuese of open sql statements.... only...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we cant use in processing of internal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards .&lt;/P&gt;&lt;P&gt;Raju Mummidi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 04:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wildcard-selection/m-p/4267251#M1018219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T04:47:51Z</dc:date>
    </item>
  </channel>
</rss>

