<?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: translating from lower to upper case using regex in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347755#M518057</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 translate statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  data : str(10) type c value 'abcd'.
  Translate str to upper case.       "&amp;lt;-- output is ABCD&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2007 13:21:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-11T13:21:59Z</dc:date>
    <item>
      <title>translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347754#M518056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;I need to translate tags in parentheses from lower to upper case. Is there a possibility to use regular expressions for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be assured that points will be rewarded for useful answers.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347754#M518056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347755#M518057</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 translate statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  data : str(10) type c value 'abcd'.
  Translate str to upper case.       "&amp;lt;-- output is ABCD&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347755#M518057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347756#M518058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;try this.&lt;/P&gt;&lt;P&gt;Put all the data of expressions in an internal table ITAB, with single text field.&lt;/P&gt;&lt;P&gt;loop at ITAB.&lt;/P&gt;&lt;P&gt;  translate itab-text+0(1) to Upper case&lt;/P&gt;&lt;P&gt;  modify itab index sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347756#M518058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347757#M518059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Felix,&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;TERM_TRANSLATE_TO_UPPER_CASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aneesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347757#M518059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347758#M518060</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;The TRANSLATE statement converts characters into upper or lower case, or uses substitution&lt;/P&gt;&lt;P&gt;rules to convert all occurrences of one character to another character.&lt;/P&gt;&lt;P&gt;Converting to Upper or Lower Case&lt;/P&gt;&lt;P&gt;TRANSLATE &amp;lt;c&amp;gt; TO UPPER CASE.&lt;/P&gt;&lt;P&gt;TRANSLATE &amp;lt;c&amp;gt; TO LOWER CASE.&lt;/P&gt;&lt;P&gt;These statements convert all lower case letters in the field &amp;lt;c&amp;gt; to upper case or vice versa.&lt;/P&gt;&lt;P&gt;Substituting Characters&lt;/P&gt;&lt;P&gt;TRANSLATE &amp;lt;c&amp;gt; USING &amp;lt;r&amp;gt;.&lt;/P&gt;&lt;P&gt;This statement replaces all characters in field &amp;lt;c&amp;gt; according to the substitution rule stored in field &amp;lt;r&amp;gt;. &amp;lt;r&amp;gt; contains pairs of letters, where the first letter of each pair is replaced by the second letter. &amp;lt;r&amp;gt; can be a variable.&lt;/P&gt;&lt;P&gt;For more variants of the TRANSLATE statement with more complex substitution rules, see the keyword documentation in the ABAP Editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;DATA: T(10) VALUE 'AbCdEfGhIj',&lt;/P&gt;&lt;P&gt;STRING LIKE T,&lt;/P&gt;&lt;P&gt;RULE(20) VALUE 'AxbXCydYEzfZ'.&lt;/P&gt;&lt;P&gt;STRING = T.&lt;/P&gt;&lt;P&gt;WRITE STRING.&lt;/P&gt;&lt;P&gt;TRANSLATE STRING TO UPPER CASE.&lt;/P&gt;&lt;P&gt;WRITE / STRING.&lt;/P&gt;&lt;P&gt;STRING = T.&lt;/P&gt;&lt;P&gt;TRANSLATE STRING TO LOWER CASE.&lt;/P&gt;&lt;P&gt;WRITE / STRING.&lt;/P&gt;&lt;P&gt;STRING = T.&lt;/P&gt;&lt;P&gt;TRANSLATE STRING USING RULE.&lt;/P&gt;&lt;P&gt;WRITE / STRING.&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;AbCdEfGhIj&lt;/P&gt;&lt;P&gt;ABCDEFGHIJ&lt;/P&gt;&lt;P&gt;abcdefghij&lt;/P&gt;&lt;P&gt;xXyYzZGhIj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 13:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347758#M518060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347759#M518061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that I don't know the content of the tags. I need to use regex for finding something between '&amp;lt;' and '&amp;gt;', and then translate the content found to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would love to use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF REGEX '\[([&lt;SUP&gt;\]]+)\]([&lt;/SUP&gt;\[]+)\[end\]'&lt;/P&gt;&lt;P&gt;IN str_gaeb&lt;/P&gt;&lt;P&gt; WITH '&amp;lt;$1&amp;gt;$2&amp;lt;/$1&amp;gt;'&amp;lt;b&amp;gt; USING UPPER CASE&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;But this doesn't exist...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 14:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347759#M518061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T14:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: translating from lower to upper case using regex</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347760#M518062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I don't pretend to be a RegEx expert by any means, but this is what I have come up with and I can safely say that I'm sure that there is a better way.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zrich_001.

DATA str(100) TYPE c.
DATA result_tab TYPE match_result_tab.
DATA result_lin LIKE LINE OF result_tab.

str = `This is a string(this needs to be upper case)`.

FIND ALL OCCURRENCES OF REGEX '([^(]*[^)])'
     IN str RESULTS result_tab.
read table result_tab into result_lin index 2.
translate str+result_lin-offset(result_lin-length) to upper case.
write:/ str.

&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>Mon, 11 Jun 2007 15:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translating-from-lower-to-upper-case-using-regex/m-p/2347760#M518062</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-11T15:21:21Z</dc:date>
    </item>
  </channel>
</rss>

