<?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: SUBSTRING in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229144#M138770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select * from ABC where category like 'Ent%'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Mar 2006 14:14:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-08T14:14:55Z</dc:date>
    <item>
      <title>SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229137#M138763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the select query how to search for a particular part of data. (in ABAP code) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table         : ABC&lt;/P&gt;&lt;P&gt;Field name    : Category&lt;/P&gt;&lt;P&gt;Field content : Enterprise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query : Select * from ABC where substr(category,1,3) ='Ent'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[The query should check the complete table ABC and list all the category where the first three characters are = 'Ent']&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:08:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229137#M138763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229138#M138764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vincent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you use a like operator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from ABC where category like '%Ent%'.&lt;/P&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>Wed, 08 Mar 2006 14:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229138#M138764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229139#M138765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Select * from ABC 
    where category like 'Ent%'.&lt;/CODE&gt;&lt;/PRE&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>Wed, 08 Mar 2006 14:11:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229139#M138765</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-08T14:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229140#M138766</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;Select * from ABC where category LIKE 'ENT%'&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Lanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229140#M138766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229141#M138767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help on the subject....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 3 &lt;/P&gt;&lt;P&gt;f [NOT] LIKE g &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;... ESCAPE h &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The condition is met for a table entry if the statement"f (does not) equal the pattern in g" is true forthe values of f and g. f must always be afield descriptor, and g an ABAP field. If f has the value NULL, then the result ofthe check for the statement is unknown. Within a pattern, thereare two special characters: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'_' (underscore) stands for any single character. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'%' (percentage sign) stands for any sequence of characters,including an empty string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples &lt;/P&gt;&lt;P&gt;Example to select all customers whose name begins with'M': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM &lt;/P&gt;&lt;P&gt;       WHERE NAME LIKE 'M%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. &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;&lt;/P&gt;&lt;P&gt;Example to select all customers whose name contains 'huber': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM &lt;/P&gt;&lt;P&gt;       WHERE NAME LIKE '%huber%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. &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;&lt;/P&gt;&lt;P&gt;Example to select all customers whose name does not contain 'n' as the second character: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM &lt;/P&gt;&lt;P&gt;       WHERE NAME NOT LIKE '_n%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM-ID, SCUSTOM-NAME. &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;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;LIKE can only be used for alphanumeric databasefields. In other words, table field f must have Dictionary typeACCP, CHAR, CLNT, CUKY, LCHR,NUMC, UNIT, VARC, TIMS or DATS. Thecomparison field g must always have type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The maximum length of the pattern is 2n - 1 characters, where n isthe length of field f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trailing spaces are ignored in comparison field g. If apattern contains trailing spaces, you must enclose it in singleinverted commas ('). If your pattern is enclosed in inverted commas andyou also want to include inverted commas as part of the pattern, theinverted commas in the pattern must be doubled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use this variant in the ON addition to theFROM clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;gt;&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:14:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229141#M138767</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-08T14:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229142#M138768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vincent&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;select * from ABC where category like 'ENT%'&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;kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229142#M138768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229143#M138769</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;&lt;/P&gt;&lt;P&gt;Query : Select * from ABC where category like '%Ent%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More info about LIKE in the SAP documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f [NOT] LIKE g &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;... ESCAPE h &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The condition is met for a table entry if the statement "f (does not) equal the pattern in g" is true for the values of f and g. f must always be a field descriptor, and g an ABAP field or an ABAP string. If f has the value NULL, then the result of the check for the statement is unknown. Within a pattern, there are two special characters: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'_' (underscore) stands for any single character. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'%' (percentage sign) stands for any sequence of characters, including an empty string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples &lt;/P&gt;&lt;P&gt;Example to select all customers whose name begins with 'M': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA SCUSTOM_WA TYPE SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM_WA &lt;/P&gt;&lt;P&gt;       WHERE NAME LIKE 'M%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME. &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;&lt;/P&gt;&lt;P&gt;Example to select all customers whose name contains 'huber': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA SCUSTOM_WA TYPE SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM_WA &lt;/P&gt;&lt;P&gt;       WHERE NAME LIKE '%huber%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME. &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;&lt;/P&gt;&lt;P&gt;Example to select all customers whose name does not contain 'n' as the second character: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA SCUSTOM_WA TYPE SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID NAME FROM SCUSTOM &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF SCUSTOM_WA &lt;/P&gt;&lt;P&gt;       WHERE NAME NOT LIKE '_n%'. &lt;/P&gt;&lt;P&gt;  WRITE: / SCUSTOM_WA-ID, SCUSTOM_WA-NAME. &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;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;LIKE can only be used for alphanumeric database fields. In other words, table field f must have Dictionary type ACCP, CHAR, CLNT, CUKY, LCHR, NUMC, UNIT, VARC, TIMS or DATS. The comparison field g must always have type C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The maximum length of the pattern is 2n - 1 characters, where n is the length of field f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trailing spaces are ignored in comparison field g. If a pattern contains trailing spaces, you must enclose it in single inverted commas ('). If your pattern is enclosed in inverted commas and you also want to include inverted commas as part of the pattern, the inverted commas in the pattern must be doubled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use this variant in the ON addition to the FROM clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229143#M138769</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-03-08T14:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229144#M138770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select * from ABC where category like 'Ent%'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229144#M138770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229145#M138771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;The solution is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ABC where category like 'Ent%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sylendra.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2006 14:17:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229145#M138771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: SUBSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229146#M138772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you want to look for 'Ent', you have to examine the domain for the field to see if it allows lower case. If it does, you have to consider if you need 'Ent%', 'ENT%' and 'ent%'. If so, you may want to consider 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 Mar 2006 14:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substring/m-p/1229146#M138772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-08T14:51:35Z</dc:date>
    </item>
  </channel>
</rss>

