<?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: Need Hello with select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415395#M820286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can build a range like the sample below and use that in select &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE 'I' TO ra_labor-sign.
MOVE 'EQ' TO ra_labor-option.
MOVE c_02 TO ra_labor-low.
APPEND ra_labor.
* CLEAR ra_labor.
MOVE c_21 TO ra_labor-low.
APPEND ra_labor.
* CLEAR ra_labor.
MOVE c_31 TO ra_labor-low. " added
APPEND ra_labor.
CLEAR ra_labor.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT rsnum rspos rsart matnr werks lgort charg bdter bdmng
meins enmng bwart
INTO TABLE gt_resb
FROM resb
WHERE xloek EQ 'X'
AND xwaok EQ space
AND kzear EQ space
AND bwart IN ('201','261','221') .
AND MATNR in ra_matnr              "&amp;lt;&amp;lt;&amp;lt; range you created above
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Feb 2008 07:00:17 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-02-14T07:00:17Z</dc:date>
    <item>
      <title>Need Hello with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415393#M820284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I How can i select all record in where MATNR starl with 1 or 2 or 3 (if there is zero it should not be consider ) I can not use&lt;/P&gt;&lt;P&gt;      c_webaz TYPE i.&lt;/P&gt;&lt;P&gt;SELECT rsnum&lt;/P&gt;&lt;P&gt;       rspos&lt;/P&gt;&lt;P&gt;       rsart&lt;/P&gt;&lt;P&gt;       matnr&lt;/P&gt;&lt;P&gt;       werks&lt;/P&gt;&lt;P&gt;       lgort&lt;/P&gt;&lt;P&gt;       charg&lt;/P&gt;&lt;P&gt;       bdter&lt;/P&gt;&lt;P&gt;       bdmng&lt;/P&gt;&lt;P&gt;       meins&lt;/P&gt;&lt;P&gt;       enmng&lt;/P&gt;&lt;P&gt;       bwart&lt;/P&gt;&lt;P&gt;INTO TABLE  gt_resb&lt;/P&gt;&lt;P&gt;FROM resb&lt;/P&gt;&lt;P&gt;WHERE   xloek EQ 'X'&lt;/P&gt;&lt;P&gt;AND     xwaok EQ space&lt;/P&gt;&lt;P&gt;AND     kzear EQ space&lt;/P&gt;&lt;P&gt;AND     bwart IN  ('201','261','221') .&lt;/P&gt;&lt;P&gt;AND     &lt;STRONG&gt;MATNR LIKE '1%'&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;because if leading zero there it not selection this recode .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 06:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415393#M820284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T06:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need Hello with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415394#M820285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; First define &lt;STRONG&gt;'1%'&lt;/STRONG&gt; in a local variable of type &lt;STRONG&gt;MATNR&lt;/STRONG&gt;, and then use that variable in your select stmt. The select stmt. which you have written is fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope this will resolve your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Regards&lt;/P&gt;&lt;P&gt;  Nagaraj T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 06:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415394#M820285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T06:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need Hello with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415395#M820286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can build a range like the sample below and use that in select &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE 'I' TO ra_labor-sign.
MOVE 'EQ' TO ra_labor-option.
MOVE c_02 TO ra_labor-low.
APPEND ra_labor.
* CLEAR ra_labor.
MOVE c_21 TO ra_labor-low.
APPEND ra_labor.
* CLEAR ra_labor.
MOVE c_31 TO ra_labor-low. " added
APPEND ra_labor.
CLEAR ra_labor.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT rsnum rspos rsart matnr werks lgort charg bdter bdmng
meins enmng bwart
INTO TABLE gt_resb
FROM resb
WHERE xloek EQ 'X'
AND xwaok EQ space
AND kzear EQ space
AND bwart IN ('201','261','221') .
AND MATNR in ra_matnr              "&amp;lt;&amp;lt;&amp;lt; range you created above
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 07:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415395#M820286</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-14T07:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need Hello with select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415396#M820287</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;You can make use of the CP (contains pattern) and NP (does not contain pattern) Options in a WHERE clause range as shown below to achieve your goal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
RANGES: r_matnr FOR mara-matnr.
CLEAR r_matnr.
r_matnr-option = 'NP'.
r_matnr-sign = 'I'.
r_matnr-low = '*0*'.
APPEND r_matnr.
r_matnr-option = 'CP'.
r_matnr-low = '1*'.
append r_matnr.

r_matnr-low = '2*'.
append r_matnr.

r_matnr-low = '3*'.
append r_matnr.

DATA: BEGIN OF itab OCCURS 0, matnr TYPE mara-matnr , END OF itab.

SELECT matnr FROM mara INTO TABLE itab
UP TO 10 ROWS
WHERE matnr IN r_matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What this does is, eliminates all material numbers which have a 0 in them and only includes those which start with 1, 2 or 3 as required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 07:02:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-hello-with-select-statement/m-p/3415396#M820287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T07:02:09Z</dc:date>
    </item>
  </channel>
</rss>

