<?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 Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270731#M781820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmasri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is when you are filling the data into your internal table fill in UPERCASE &lt;/P&gt;&lt;P&gt;use this FM &lt;/P&gt;&lt;P&gt;call function 'AIPC_CONVERT_TO_UPPERCASE'&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;          i_input        =  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_LANGU        = 'EN'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;         e_output       = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it will work fine&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;hitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2008 11:33:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-14T11:33:00Z</dc:date>
    <item>
      <title>Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270730#M781819</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;select * &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;FROM ypbs&lt;/P&gt;&lt;P&gt;WHERE name IN s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the entries in ypbs &lt;/P&gt;&lt;P&gt;ab&lt;/P&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;Ab&lt;/P&gt;&lt;P&gt;aB&lt;/P&gt;&lt;P&gt;now in selection screen i will give A* then the output will be &lt;/P&gt;&lt;P&gt;AB and Ab but my requirement is to get all the entries starts with A/a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;helpme in this regard&lt;/P&gt;&lt;P&gt;ponts will rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270730#M781819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270731#M781820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmasri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is when you are filling the data into your internal table fill in UPERCASE &lt;/P&gt;&lt;P&gt;use this FM &lt;/P&gt;&lt;P&gt;call function 'AIPC_CONVERT_TO_UPPERCASE'&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;          i_input        =  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         I_LANGU        = 'EN'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;         e_output       = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it will work fine&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;hitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270731#M781820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270732#M781821</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;do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;FROM ypbs&lt;/P&gt;&lt;P&gt;WHERE name = 'A%' or 'a%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270732#M781821</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-01-14T11:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270733#M781822</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;Check whether you have rightly declared the type of the select option with the field which you are trying to query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e., Check whether the declaration for your select options is ,&lt;/P&gt;&lt;P&gt;select-options s_name for ypbs-name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the values that you have mentioned I gather that the domain of the field &lt;/P&gt;&lt;P&gt;YPBA-NAME is made case sensitive(Lowercase is checked). So the Select option will also behave in the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also convert the case of the input value and append into the range s_name before passing it on to the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name1 = s_name.&lt;/P&gt;&lt;P&gt;append s_name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE s_name-low TO UPPER CASE. &lt;/P&gt;&lt;P&gt; append s_name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE s_name-low TO LOWER CASE. &lt;/P&gt;&lt;P&gt;append s_name1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort s_name1.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from s_name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name[]  = s_name1[] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: majisha bharathan on Jan 14, 2008 12:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270733#M781822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270734#M781823</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;previously client have the data in the table both in lower/upper case,now we have to retrieve both&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270734#M781823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270735#M781824</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 use following code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;range s_name2 for s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name2 = s_name[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_name2.&lt;/P&gt;&lt;P&gt;translate s_name2-low to upper.&lt;/P&gt;&lt;P&gt;translate s_name2-low to upper.&lt;/P&gt;&lt;P&gt;modify s_name2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_name.&lt;/P&gt;&lt;P&gt;translate s_name-low to lower.&lt;/P&gt;&lt;P&gt;translate s_name-low to lower.&lt;/P&gt;&lt;P&gt;modify s_name.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;FROM ypbs&lt;/P&gt;&lt;P&gt;WHERE name IN s_name or name IN s_name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L.Velu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270735#M781824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270736#M781825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmasri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below will work only for when user gives one latter and does patternr search&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;constants c_rule type char52 value 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_name.&lt;/P&gt;&lt;P&gt;translate s_name-low+0(1) using c_rule.&lt;/P&gt;&lt;P&gt;append r_name1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;append lines of r_name1 to s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select * &lt;/P&gt;&lt;P&gt;INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;FROM ypbs&lt;/P&gt;&lt;P&gt;WHERE name IN s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be on similar lines you can try to write a generic code which will take care of all possible cases. Other option would be retrieve all the data then using String Comparision operators, delete the unwanted records. Second options looks more reasonable and feasibly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 11:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270736#M781825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T11:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270737#M781826</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;help me ..requirement is urgent &lt;/P&gt;&lt;P&gt;my question is not answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 12:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270737#M781826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T12:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270738#M781827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Majisha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : S_NAME FOR Ypbs-NAME OBLIGATORY.&lt;/P&gt;&lt;P&gt;RANGES:          s_name1 FOR ypbs-name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE s_name-low TO UPPER CASE.&lt;/P&gt;&lt;P&gt;append s_name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE s_name-low TO LOWER CASE.&lt;/P&gt;&lt;P&gt;append s_name1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name] = s_name1[.----&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;plz check here &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;  INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;  FROM Ypbs&lt;/P&gt;&lt;P&gt;  WHERE NAME IN  s_name. "or NAME IN s_name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;  WRITE :/05 ITAB-NAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 12:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270738#M781827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T12:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270739#M781828</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;By mistake they may be printed by the concerned person &lt;/P&gt;&lt;P&gt;remove the braces and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;s_name  = s_name1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 13:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270739#M781828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T13:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270740#M781829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT-OPTIONS : s_name FOR ypbs-name OBLIGATORY.
RANGES: s_name1 FOR ypbs-name.
RANGES: s_name2 FOR ypbs-name.




TRANSLATE s_name-low TO LOWER CASE.
s_name1-low = s_name-low.
s_name1-sign = s_name-sign.
s_name1-option = s_name-option.
APPEND s_name1.

TRANSLATE s_name-low TO UPPER CASE.
s_name2-low = s_name-low.
s_name2-sign = s_name-sign.
s_name2-option = s_name-option.
APPEND s_name2.



SELECT *
INTO TABLE itab
FROM ypbs
WHERE name IN s_name1 OR name IN s_name2 .

IF sy-subrc = 0.
  LOOP AT itab.
    WRITE :/05 itab-name.
  ENDLOOP.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 13:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270740#M781829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T13:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270741#M781830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmasri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The browser is acts in a very wierd way,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to move the entire table contents of s_name1 to s_name using square braces. But somehow its not getting displayed prperly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;S_NAME[ ] = S_NAME1[ ]&lt;/STRONG&gt; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 14:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/3270741#M781830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T14:16:25Z</dc:date>
    </item>
  </channel>
</rss>

