<?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 statment - where clause in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383277#M1237934</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 all names form pa0001 into internal table and convert the names to upper case .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search according to u r requirement it will work..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2009 07:19:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-16T07:19:21Z</dc:date>
    <item>
      <title>select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383269#M1237926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;I want to write a select statment,&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from pa0001 where ename like '%Rahul%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so this stamemt will give me all DB rows in which ename contains &lt;STRONG&gt;Rahul&lt;/STRONG&gt; but i also want rows those are having &lt;STRONG&gt;rahul&lt;/STRONG&gt; or &lt;STRONG&gt;rAhul&lt;/STRONG&gt; or &lt;STRONG&gt;raHul&lt;/STRONG&gt; or &lt;STRONG&gt;RAhul&lt;/STRONG&gt; or &lt;STRONG&gt;RAHul&lt;/STRONG&gt; or &lt;STRONG&gt;RaHul&lt;/STRONG&gt; like wise....&lt;/P&gt;&lt;P&gt;can u plz help me on this ??? &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 15:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383269#M1237926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383270#M1237927</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;It is not possible to search the pernr's using the ename as data in the PA0001-ENAME  is case sensitive so you need to search the name in the same case as it is stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have two options..&lt;/P&gt;&lt;P&gt;1. first fetch the data from the PA0001 and covert ename in all the records to uppercase and then search in the uppercase..now you get all the list of pernr's for the given part name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. use the PA0002 to find the pernr using NCHMC VNAMC fields as these two fields stores the last name and first name in upper case(generally sap uses these fields as seach field to find the pernr for the given name).&lt;/P&gt;&lt;P&gt;If you compare NACHN &amp;amp; VORNA with NCHMC &amp;amp; VNAMC ..NACHN &amp;amp; VORNA  stores the data in the same case as user entered where as NCHMC &amp;amp; VNAMC stores in Upper case...so use these field for search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't find such match code field for ename in PA0001.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 15:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383270#M1237927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T15:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383271#M1237928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul, check this code which I wrote for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zj_test LINE-SIZE 162.

PARAMETER: pa_name TYPE text40.

DATA: ra_name TYPE STANDARD TABLE OF selopt,
      wa_name TYPE selopt,
      lv_name TYPE text40,
      lv_i TYPE i, lv_count TYPE i.

lv_name = pa_name.

lv_i = STRLEN( lv_name ).

DO lv_i TIMES.
  TRANSLATE lv_name+lv_count(1) TO UPPER CASE.
  wa_name-sign = 'I'.
  wa_name-option = 'EQ'.
  wa_name-low = lv_name.
  APPEND wa_name TO ra_name.   " ra_name in select (where ename in ra_name).
  WRITE: wa_name-low.
  lv_name = pa_name.
  lv_count = lv_count + 1.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;Input:&amp;lt;&amp;lt;&amp;lt; rahul.

output:&amp;gt;&amp;gt;&amp;gt;
Rahul
rAhul
raHul
rahUl
rahuL&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 15:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383271#M1237928</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-08T15:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383272#M1237929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very easy if you use native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 20:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383272#M1237929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T20:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383273#M1237930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Can u plz explain me how to use native sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;Dont focus on table....&lt;/P&gt;&lt;P&gt;my need is all rows with the selection criteria is not case sensitive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 05:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383273#M1237930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T05:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383274#M1237931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write your select query inside the block:&lt;/P&gt;&lt;P&gt;EXEC(Query)ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Refer Native Sql|http://help.sap.com/abapdocu/en/ABAPEXEC_IMPLICIT.htm]&lt;/P&gt;&lt;P&gt;[Refer Native Sql|http://help.sap.com/abapdocu/en/ABAPEXEC.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2009 06:24:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383274#M1237931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-09T06:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383275#M1237932</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;try this:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables EVER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : IT_EVER LIKE STANDARD TABLE OF EVER WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges : R_ERNAM FOR EVER-ERNAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R_ERNAM-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;R_ERNAM-OPTION = 'CP'.&lt;/P&gt;&lt;P&gt;R_ERNAM-LOW = '&lt;STRONG&gt;RAHUL&lt;/STRONG&gt;'.   " here rahul is with any case of character&lt;/P&gt;&lt;P&gt;APPEND R_ERNAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM EVER INTO TABLE IT_EVER WHERE ERNAM IN R_ERNAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 05:21:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383275#M1237932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T05:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383276#M1237933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Normally we don't use the character field for fetching data in select statement. Instead of name use Emp no&lt;/P&gt;&lt;P&gt;(Pernr) in your select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from pa0001 into corresponding field of itab where pernr = S_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use S_pernr in selection screen.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 05:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383276#M1237933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T05:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383277#M1237934</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 all names form pa0001 into internal table and convert the names to upper case .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search according to u r requirement it will work..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 07:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383277#M1237934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T07:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383278#M1237935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 05:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383278#M1237935</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T05:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383279#M1237936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)write select statement considering  all names form pa0001 into internal table  and then convert the ename fields data ie names to upper case.&lt;/P&gt;&lt;P&gt;2)Then loop at above internal table with where condition as '%rahul%' and only data which have ename as rahul fetched . move the related fields data to a new internal table and append the table.&lt;/P&gt;&lt;P&gt;3)New appended table has the required data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the above and hope this will solve the problem.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vengal rao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 10:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383279#M1237936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T10:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383280#M1237937</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;Find the below code which may be useful for your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges:r_sel for lfa1-name1.&lt;/P&gt;&lt;P&gt;data:v_name(5) type c value 'laxmi'.&lt;/P&gt;&lt;P&gt;data:len type i,&lt;/P&gt;&lt;P&gt;v_num type i,&lt;/P&gt;&lt;P&gt;v_num1 type i,&lt;/P&gt;&lt;P&gt;v_num2 type i,&lt;/P&gt;&lt;P&gt;v_name1(5) type c,&lt;/P&gt;&lt;P&gt;v_name2(5) type c,&lt;/P&gt;&lt;P&gt;v_name_final(7) type c,&lt;/P&gt;&lt;P&gt;v_char type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( v_name ).&lt;/P&gt;&lt;P&gt;clear:v_name1,v_name2,v_name_final,v_num,v_num1,v_num2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_num1 = len.&lt;/P&gt;&lt;P&gt;do len times.&lt;/P&gt;&lt;P&gt;  v_num1 = v_num1 - 1.&lt;/P&gt;&lt;P&gt;  v_char = v_name+v_num(1).&lt;/P&gt;&lt;P&gt;  v_num2 = v_num.&lt;/P&gt;&lt;P&gt;  v_num = v_num + 1.&lt;/P&gt;&lt;P&gt;  if v_num1 is initial.&lt;/P&gt;&lt;P&gt;    clear:v_name1.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    v_name1 = v_name+v_num(v_num1).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if v_num2 is not initial.&lt;/P&gt;&lt;P&gt;    v_name2 = v_name+0(v_num2).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  translate v_char to upper case.&lt;/P&gt;&lt;P&gt;  concatenate '&lt;STRONG&gt;' v_name2 v_char v_name1 '&lt;/STRONG&gt;' into v_name_final.&lt;/P&gt;&lt;P&gt;  r_sel-option =  'CP'.&lt;/P&gt;&lt;P&gt;  r_sel-sign = 'I'.&lt;/P&gt;&lt;P&gt;  r_sel-low = v_name_final.&lt;/P&gt;&lt;P&gt;  clear:r_sel-high.&lt;/P&gt;&lt;P&gt;  append r_sel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  translate v_char to lower case.&lt;/P&gt;&lt;P&gt;  concatenate '&lt;STRONG&gt;' v_name2 v_char v_name1 '&lt;/STRONG&gt;' into v_name_final.&lt;/P&gt;&lt;P&gt;  r_sel-option =  'CP'.&lt;/P&gt;&lt;P&gt;  r_sel-sign = 'I'.&lt;/P&gt;&lt;P&gt;  r_sel-low = v_name_final.&lt;/P&gt;&lt;P&gt;  clear:r_sel-high.&lt;/P&gt;&lt;P&gt;  append r_sel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use range parameter in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sripal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 10:58:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383280#M1237937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T10:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: select statment - where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383281#M1237938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;studying.....&lt;/P&gt;&lt;P&gt;bob:&lt;/P&gt;&lt;P&gt;i want to know how to write the sentence by native sql.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 07:35:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment-where-clause/m-p/5383281#M1237938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-30T07:35:57Z</dc:date>
    </item>
  </channel>
</rss>

