<?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 string operations in SELECT WHERE clause in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106596#M104948</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;PARAMETERS: P_MAKTX TYPE MAKT-MAKTX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say the user inputs "Pump". I want the program to search the text "pump" in all makt-maktx and display the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone tell me how to write the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from MAKT into table IT_MAKT where MAKTX ??? P_MAKTX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shobhit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2005 14:12:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-21T14:12:03Z</dc:date>
    <item>
      <title>string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106596#M104948</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;PARAMETERS: P_MAKTX TYPE MAKT-MAKTX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say the user inputs "Pump". I want the program to search the text "pump" in all makt-maktx and display the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone tell me how to write the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from MAKT into table IT_MAKT where MAKTX ??? P_MAKTX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shobhit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 14:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106596#M104948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-21T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106597#M104949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shobit,&lt;/P&gt;&lt;P&gt; use the like addition,&lt;/P&gt;&lt;P&gt;PARAMETERS srch_str(20) TYPE c. &lt;/P&gt;&lt;P&gt;CONCATENATE '%' srch_str '%' INTO srch_str. &lt;/P&gt;&lt;P&gt;DATA text_tab TYPE TABLE OF doktl. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM doktl &lt;/P&gt;&lt;P&gt;       INTO TABLE text_tab &lt;/P&gt;&lt;P&gt;       WHERE doktext LIKE srch_str. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case it would be&lt;/P&gt;&lt;P&gt;CONCATENATE '%' P_MAKTX '%' INTO P_MAKTX. &lt;/P&gt;&lt;P&gt;SELECT * from MAKT into table IT_MAKT where MAKTX like P_MAKTX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravi Kanth Talagana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravi Kanth Talagana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 14:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106597#M104949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-21T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106598#M104950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this....&lt;/P&gt;&lt;P&gt;This is an example for using the parameter.  You could use a select-option instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001
       no standard page heading.


data: imakt type table of makt with header line.

parameters: p_maktx type makt-maktx.


ranges: r_maktx for imakt-maktx.

r_maktx-sign = 'I'.
r_maktx-option = 'CP'.
concatenate '*' p_maktx '*' into r_maktx-low.
condense r_maktx-low.
append r_maktx.

select * into corresponding fields of table imakt
         from makt
              where maktx in r_maktx
                and spras = sy-langu.

loop at imakt.
  write:/ imakt-matnr, imakt-maktx.

endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 14:20:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106598#M104950</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T14:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106599#M104951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Duplicate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 14:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106599#M104951</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T14:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106600#M104952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just remember that this is case sensitive, so instead, use the MAKTG field which has the uppercase equivalent description. You can change your user input also into uppercase and use the code that others mentioned here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 19:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106600#M104952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-21T19:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in SELECT WHERE clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106601#M104953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure to award points for helpful answers and if you problem is solved, mark you post as solved.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 19:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-select-where-clause/m-p/1106601#M104953</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T19:11:42Z</dc:date>
    </item>
  </channel>
</rss>

