<?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: string operation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160082#M456808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruchi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS srch_str(20) TYPE c. 
CONCATENATE '%' srch_str '%' INTO srch_str. 
DATA text_tab TYPE TABLE OF doktl. 
SELECT * 
       FROM doktl 
       INTO TABLE text_tab 
       WHERE doktext LIKE srch_str. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2007 16:35:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-08T16:35:42Z</dc:date>
    <item>
      <title>string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160081#M456807</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;i need some help with string operation.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using a select-option which requires a user to enter the operation text .&lt;/P&gt;&lt;P&gt;SELECT-OPTION : S_LTXA1 FOR AFVC-LTXA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is that if the user enters a part of the string, i need to search that word and display the entire string that contains that paricular word or pattern..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg: if the user entered "ASSEMBLE", i need to look up into AFVC-LTXA1 and pick up "ASSEMBLE TOP".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have written the following piece of code but cant figure out where i went wrong because my internal table int_afvc soes not get populated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM F_GET_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*RANGES: R_LTXA1 FOR AFVC-LTXA1.   "commented&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**LOOP AT S_LTXA1.          "commented&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; R_LTXA1-SIGN = 'I'.          "commented&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; R_LTXA1-OPTION  = 'CP'.    "commented&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; CONCATENATE '%'S_LTXA1-LOW'%' into S_LTXA1-LOW.      "commented&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; CONDENSE R_LTXA1-LOW.                                "commented&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; APPEND R_LTXA1.                         "commented&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;**ENDLOOP.                                           "commented&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT INT_REPORT.&lt;/P&gt;&lt;P&gt;   IF INT_REPORT-DEL12 &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE AUFNR PLNBEZ AUFPL&lt;/P&gt;&lt;P&gt;           INTO INT_AFKO&lt;/P&gt;&lt;P&gt;           FROM AFKO&lt;/P&gt;&lt;P&gt;           WHERE AUFNR = INT_REPORT-DEL12&lt;/P&gt;&lt;P&gt;           AND   PLNBEZ = INT_REPORT-MATNR.&lt;/P&gt;&lt;P&gt;           APPEND INT_AFKO.                    &lt;/P&gt;&lt;P&gt;    ENDIF.&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 INT_AFKO.&lt;/P&gt;&lt;P&gt;   SELECT SINGLE AUFPL APLZL ARBID LTXA1 OBJNR&lt;/P&gt;&lt;P&gt;                  INTO INT_AFVC&lt;/P&gt;&lt;P&gt;                  FROM AFVC&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 for all entries in int_afko                      "commented&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                  WHERE AUFPL = INT_AFKO-AUFPL&lt;/P&gt;&lt;P&gt;                  AND LTXA1 LIKE '%S_LTXA1-LOW%'.&lt;/P&gt;&lt;P&gt;    APPEND INT_AFVC.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have even tried with upper and lower case and by hardcoding values in place of S)LTXA1-LOW........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest if i am going wrong somewhere..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 16:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160081#M456807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T16:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160082#M456808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruchi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS srch_str(20) TYPE c. 
CONCATENATE '%' srch_str '%' INTO srch_str. 
DATA text_tab TYPE TABLE OF doktl. 
SELECT * 
       FROM doktl 
       INTO TABLE text_tab 
       WHERE doktext LIKE srch_str. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 16:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160082#M456808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T16:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160083#M456809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this --&amp;gt; AND LTXA1 LIKE '%S_LTXA1-LOW%'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be AND LTXA1 LIKE S_LTXA1-LOW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 16:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160083#M456809</guid>
      <dc:creator>vyende</dc:creator>
      <dc:date>2007-05-08T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160084#M456810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, upper and lower case will be an issue. I think you'll have to 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>Tue, 08 May 2007 16:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160084#M456810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160085#M456811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
s_ltxa1-low = '%ASSEMBLE%'.

EXEC SQL.
  SELECT afvc.aufpl, afvc.aplzl, afvc.arbid, afvc.ltxa1, afvc.objnr
  INTO :int_afvc
  FROM  AFVC
  WHERE UPPER(ltxa1)  like :s_ltxa1-low
ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 18:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160085#M456811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T18:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160086#M456812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i figured out the problem .&lt;/P&gt;&lt;P&gt;when we use like in where clause of select, we can include only one where condition. giving multiple where conditions will cause it to fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, right now it will select only those strings which exactly match my pattern...in other words upper case and lower case are still an issue ....&lt;/P&gt;&lt;P&gt;if you look at table AFVC ( for eg: AUFPL = 5041 )&lt;/P&gt;&lt;P&gt;You will find some text appears like :  Assemble&lt;/P&gt;&lt;P&gt;                                                    : final&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so there is problem of upper case and lower case, at times i miss out on the required strings due to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will try out the piece of code that you have sent and see if that solves the CASE SENSITIVITY problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 18:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160086#M456812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T18:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160087#M456813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use multiple LIKEs, but only one value will be returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2007 18:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160087#M456813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-08T18:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160088#M456814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get a run time error when i run the SQL . it says error 919 occured when running exeq sql......&lt;/P&gt;&lt;P&gt;wat do i do. its urgent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 14:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160088#M456814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160089#M456815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still working on this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 15:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160089#M456815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T15:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160090#M456816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any further information other than just 919?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you on an Oracle database? DB2??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 13:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160090#M456816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T13:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160091#M456817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this coding.&lt;/P&gt;&lt;P&gt;tables ZVMCCTEST.&lt;/P&gt;&lt;P&gt;select-options so_test for zvmcctest-Field1.&lt;/P&gt;&lt;P&gt;select * from ZVMCCTEST where field1 in so_test.&lt;/P&gt;&lt;P&gt;write zvmcctest-field1.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also concatenate * before and after the string.&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Vamsi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vamsi MM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 18:00:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160091#M456817</guid>
      <dc:creator>former_member219399</dc:creator>
      <dc:date>2007-05-10T18:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160092#M456818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruchi,&lt;/P&gt;&lt;P&gt;  Follow one of the following methods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Parameters: p_ltxa1 like afvc-ltxa1 lower-case.

data: v_ltxa1(42).

concatenate '%' p_ltxa1 '%' into v_ltxa1.

SELECT SINGLE AUFPL APLZL ARBID LTXA1 OBJNR
INTO INT_AFVC
FROM AFVC
WHERE AUFPL = INT_AFKO-AUFPL
AND LTXA1 LIKE v_ltxa1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method2)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTION : S_LTXA1 FOR AFVC-LTXA1 lower-case.

RANGES: R_LTXA1 FOR AFVC-LTXA1. 

LOOP AT S_LTXA1.
 R_LTXA1-SIGN = 'I'.
 R_LTXA1-OPTION = 'CP'.
 CONCATENATE '*' S_LTXA1-LOW '*' into R_LTXA1-LOW. 
 CONDENSE R_LTXA1-LOW. 
 APPEND R_LTXA1.
ENDLOOP. 

SELECT SINGLE AUFPL APLZL ARBID LTXA1 OBJNR
INTO INT_AFVC
FROM AFVC
WHERE AUFPL = INT_AFKO-AUFPL
AND LTXA1 in r_ltxa1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 18:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160092#M456818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T18:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160093#M456819</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;According to your requirement i understand this way, look at the code if it fits ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : afvc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0.&lt;/P&gt;&lt;P&gt;        include structure afvc.&lt;/P&gt;&lt;P&gt;data end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : q_tab like itab occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_ltxa1 like afvc-ltxa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from afvc into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  if itab-ltxa1 cs p_ltxa1.&lt;/P&gt;&lt;P&gt;  move itab-ltxa1 to q_tab-ltxa1.&lt;/P&gt;&lt;P&gt;  append q_tab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at q_tab.&lt;/P&gt;&lt;P&gt;write : / q_tab-ltxa1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sarath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 19:08:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operation/m-p/2160093#M456819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T19:08:39Z</dc:date>
    </item>
  </channel>
</rss>

