<?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: reverse a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992468#M74593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Things are always easier than people imagined. Just a hint for getting nth word of a string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: chr  type sychar01,&lt;/P&gt;&lt;P&gt;      str  type string,&lt;/P&gt;&lt;P&gt;      nth  type i value 5,&lt;/P&gt;&lt;P&gt;      len  type i value 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; chr = str+nth(len).&lt;/P&gt;&lt;P&gt; write: / chr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See what will happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Aug 2006 11:30:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-22T11:30:41Z</dc:date>
    <item>
      <title>reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992462#M74587</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;           Is there any function to reverse a string ? I also want to know whether there is any function that takes a string as input and returns nth word of that string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vishnu Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 08:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992462#M74587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T08:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992463#M74588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vishnu Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To find the nth word of the string, use STRLEN statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To reverse a string, use the function module STRING_REVERSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 08:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992463#M74588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T08:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992464#M74589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&lt;/P&gt;&lt;P&gt;          Thanks for ur very quick reply. STRLEN will return the length of a string. But I want to find nth word in a string. For Eg. if string is ' This is a sample string'. I want to get 4th word in that string, i.e, 'sample'. Is there any such function. I will try STRING_REVERSE. Thank  u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vishnu Priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 08:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992464#M74589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T08:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992465#M74590</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;REPORT demo_data_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;shifting strings by a given number of places&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t1(10) TYPE c VALUE 'abcdefghij',&lt;/P&gt;&lt;P&gt;      string1 LIKE t1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string1 = t1.&lt;/P&gt;&lt;P&gt;WRITE string1.&lt;/P&gt;&lt;P&gt;SHIFT string1.&lt;/P&gt;&lt;P&gt;WRITE / string1.&lt;/P&gt;&lt;P&gt;string1 = t1.&lt;/P&gt;&lt;P&gt;SHIFT string1 BY 3 PLACES LEFT.&lt;/P&gt;&lt;P&gt;WRITE / string1.&lt;/P&gt;&lt;P&gt;string1 = t1.&lt;/P&gt;&lt;P&gt;SHIFT string1 BY 3 PLACES RIGHT.&lt;/P&gt;&lt;P&gt;WRITE / string1.&lt;/P&gt;&lt;P&gt;string1 = t1.&lt;/P&gt;&lt;P&gt;SHIFT string1 BY 3 PLACES CIRCULAR.&lt;/P&gt;&lt;P&gt;WRITE / string1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;shifting up to a given string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t2(10) TYPE c VALUE 'abcdefghij',&lt;/P&gt;&lt;P&gt;      string2 LIKE t2,&lt;/P&gt;&lt;P&gt;      str2(2) TYPE c VALUE 'ef'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string2 = t2.&lt;/P&gt;&lt;P&gt;WRITE string2.&lt;/P&gt;&lt;P&gt;SHIFT string2 UP TO str2.&lt;/P&gt;&lt;P&gt;WRITE / string2.&lt;/P&gt;&lt;P&gt;string2 = t2.&lt;/P&gt;&lt;P&gt;SHIFT string2 UP TO str2 LEFT.&lt;/P&gt;&lt;P&gt;WRITE / string2.&lt;/P&gt;&lt;P&gt;string2 = t2.&lt;/P&gt;&lt;P&gt;SHIFT string2  UP TO str2 RIGHT.&lt;/P&gt;&lt;P&gt;WRITE / string2.&lt;/P&gt;&lt;P&gt;string2 = t2.&lt;/P&gt;&lt;P&gt;SHIFT string2  UP TO str2 CIRCULAR.&lt;/P&gt;&lt;P&gt;WRITE / string2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;shifting a string depending on the first or last sign&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t3(14) TYPE c VALUE '    abcdefghij',&lt;/P&gt;&lt;P&gt;      string3 LIKE t3,&lt;/P&gt;&lt;P&gt;      str3(6) TYPE c VALUE 'ghijkl'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string3 = t3.&lt;/P&gt;&lt;P&gt;WRITE string3.&lt;/P&gt;&lt;P&gt;SHIFT string3 LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;WRITE / string3.&lt;/P&gt;&lt;P&gt;string3 = t3.&lt;/P&gt;&lt;P&gt;SHIFT string3 RIGHT DELETING TRAILING str3.&lt;/P&gt;&lt;P&gt;WRITE / string3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;replacing values&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t4(10) TYPE c VALUE 'abcdefghij',&lt;/P&gt;&lt;P&gt;      string4 LIKE t4,&lt;/P&gt;&lt;P&gt;      str41(4) TYPE c VALUE 'cdef',&lt;/P&gt;&lt;P&gt;      str42(4) TYPE c VALUE 'klmn',&lt;/P&gt;&lt;P&gt;      str43(2) TYPE c VALUE 'kl',&lt;/P&gt;&lt;P&gt;      str44(6) TYPE c VALUE 'klmnop',&lt;/P&gt;&lt;P&gt;      len4 TYPE i VALUE 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string4 = t4.&lt;/P&gt;&lt;P&gt;WRITE string4.&lt;/P&gt;&lt;P&gt;REPLACE str41 WITH str42 INTO string4.&lt;/P&gt;&lt;P&gt;WRITE / string4.&lt;/P&gt;&lt;P&gt;string4 = t4.&lt;/P&gt;&lt;P&gt;REPLACE str41 WITH str42 INTO string4 LENGTH len4.&lt;/P&gt;&lt;P&gt;WRITE / string4.&lt;/P&gt;&lt;P&gt;string4 = t4.&lt;/P&gt;&lt;P&gt;REPLACE str41 WITH str43 INTO string4.&lt;/P&gt;&lt;P&gt;WRITE / string4.&lt;/P&gt;&lt;P&gt;string4 = t4.&lt;/P&gt;&lt;P&gt;REPLACE str41 WITH str44 INTO string4.&lt;/P&gt;&lt;P&gt;WRITE / string4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;translating signs&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t5(10) TYPE c VALUE 'AbCdEfGhIj',&lt;/P&gt;&lt;P&gt;      string5 LIKE t5,&lt;/P&gt;&lt;P&gt;      rule5(20) TYPE c VALUE 'AxbXCydYEzfZ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string5 = t5.&lt;/P&gt;&lt;P&gt;WRITE string5.&lt;/P&gt;&lt;P&gt;TRANSLATE string5 TO UPPER CASE.       "#EC SYNTCHAR&lt;/P&gt;&lt;P&gt;WRITE / string5.&lt;/P&gt;&lt;P&gt;string5 = t5.&lt;/P&gt;&lt;P&gt;TRANSLATE string5 TO LOWER CASE.       "#EC SYNTCHAR&lt;/P&gt;&lt;P&gt;WRITE / string5.&lt;/P&gt;&lt;P&gt;string5 = t5.&lt;/P&gt;&lt;P&gt;TRANSLATE string5 USING rule5.         "#EC SYNTCHAR&lt;/P&gt;&lt;P&gt;WRITE / string5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;overlaying strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t6(10) TYPE c VALUE 'a c e g i ',&lt;/P&gt;&lt;P&gt;      string6 LIKE t6,&lt;/P&gt;&lt;P&gt;      over6(10) TYPE c VALUE 'ABCDEFGHIJ',&lt;/P&gt;&lt;P&gt;      str6(2) TYPE c VALUE 'ai'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string6 = t6.&lt;/P&gt;&lt;P&gt;WRITE string6.&lt;/P&gt;&lt;P&gt;WRITE / over6.&lt;/P&gt;&lt;P&gt;OVERLAY string6 WITH over6.&lt;/P&gt;&lt;P&gt;WRITE / string6.&lt;/P&gt;&lt;P&gt;string6 = t6.&lt;/P&gt;&lt;P&gt;OVERLAY string6 WITH over6 ONLY str6.&lt;/P&gt;&lt;P&gt;WRITE / string6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;*searching strings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA string7(30) TYPE c VALUE 'This is a little sentence.'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Searched', 'SY-SUBRC', 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ULINE /1(26).&lt;/P&gt;&lt;P&gt;SEARCH string7 FOR 'X'.&lt;/P&gt;&lt;P&gt;WRITE: / 'X', sy-subrc UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;               sy-fdpos UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH string7 FOR 'itt   '.&lt;/P&gt;&lt;P&gt;WRITE: / 'itt   ', sy-subrc UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;                   sy-fdpos UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH string7 FOR '.e .'.&lt;/P&gt;&lt;P&gt;WRITE: / '.e .', sy-subrc UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;                  sy-fdpos UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH string7 FOR '*e'.&lt;/P&gt;&lt;P&gt;WRITE: / '*e ', sy-subrc UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;                sy-fdpos UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH string7 FOR 's*'.&lt;/P&gt;&lt;P&gt;WRITE: / 's* ', sy-subrc UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;                sy-fdpos UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&amp;lt;/b&amp;gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: string8(30) TYPE c VALUE 'This is a fast first example.',&lt;/P&gt;&lt;P&gt;      pos8 TYPE i,&lt;/P&gt;&lt;P&gt;      off8 TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE / string8.&lt;/P&gt;&lt;P&gt;SEARCH string8 FOR 'ft' ABBREVIATED.&lt;/P&gt;&lt;P&gt;WRITE: / 'SY-FDPOS:', sy-fdpos.&lt;/P&gt;&lt;P&gt;pos8 = sy-fdpos + 2.&lt;/P&gt;&lt;P&gt;SEARCH string8 FOR 'ft' ABBREVIATED STARTING AT pos8 AND MARK.&lt;/P&gt;&lt;P&gt;WRITE / string8.&lt;/P&gt;&lt;P&gt;WRITE: / 'SY-FDPOS:', sy-fdpos.&lt;/P&gt;&lt;P&gt;off8 = pos8 + sy-fdpos - 1.&lt;/P&gt;&lt;P&gt;WRITE: / 'Off:', off8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;length of a string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: int TYPE i,&lt;/P&gt;&lt;P&gt;      word1(20) TYPE c VALUE '12345',&lt;/P&gt;&lt;P&gt;      word2(20) TYPE c ,&lt;/P&gt;&lt;P&gt;      word3(20) TYPE c VALUE '   4         '.&lt;/P&gt;&lt;P&gt;int = strlen( word1 ). WRITE   int.&lt;/P&gt;&lt;P&gt;int = strlen( word2 ). WRITE / int.&lt;/P&gt;&lt;P&gt;int = strlen( word3 ). WRITE / int.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;condensing strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: string9(25) TYPE c VALUE ' one  two   three    four',&lt;/P&gt;&lt;P&gt;      len9 TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len9 = strlen( string9 ).&lt;/P&gt;&lt;P&gt;WRITE: string9, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len9.&lt;/P&gt;&lt;P&gt;CONDENSE string9.&lt;/P&gt;&lt;P&gt;len9 = strlen( string9 ).&lt;/P&gt;&lt;P&gt;WRITE: string9, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len9.&lt;/P&gt;&lt;P&gt;CONDENSE string9 NO-GAPS.&lt;/P&gt;&lt;P&gt;len9 = strlen( string9 ).&lt;/P&gt;&lt;P&gt;WRITE: string9, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;concatenating strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: c1(10)  TYPE c VALUE  'Sum',&lt;/P&gt;&lt;P&gt;      c2(3)   TYPE c VALUE  'mer',&lt;/P&gt;&lt;P&gt;      c3(5)   TYPE c VALUE  'holi ',&lt;/P&gt;&lt;P&gt;      c4(10)  TYPE c VALUE  'day',&lt;/P&gt;&lt;P&gt;      c5(30)  TYPE c ,&lt;/P&gt;&lt;P&gt;      sep(3)  TYPE c VALUE ' - '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE c1 c2 c3 c4 INTO c5.&lt;/P&gt;&lt;P&gt;WRITE c5.&lt;/P&gt;&lt;P&gt;CONCATENATE c1 c2 c3 c4 INTO c5 SEPARATED BY sep.&lt;/P&gt;&lt;P&gt;WRITE / c5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;splitting strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: string10(60) TYPE c ,&lt;/P&gt;&lt;P&gt;      p1(20) TYPE c VALUE '++++++++++++++++++++',&lt;/P&gt;&lt;P&gt;      p2(20) TYPE c VALUE '++++++++++++++++++++',&lt;/P&gt;&lt;P&gt;      p3(20) TYPE c VALUE '++++++++++++++++++++',&lt;/P&gt;&lt;P&gt;      p4(20) TYPE c VALUE '++++++++++++++++++++',&lt;/P&gt;&lt;P&gt;      del10(3) TYPE c VALUE '***'.&lt;/P&gt;&lt;P&gt;string10 = ' Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5'.&lt;/P&gt;&lt;P&gt;WRITE string10.&lt;/P&gt;&lt;P&gt;SPLIT string10 AT del10 INTO p1 p2 p3 p4.&lt;/P&gt;&lt;P&gt;WRITE / p1.&lt;/P&gt;&lt;P&gt;WRITE / p2.&lt;/P&gt;&lt;P&gt;WRITE / p3.&lt;/P&gt;&lt;P&gt;WRITE / p4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;moving parts of strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: mc1(10) TYPE c VALUE 'ABCDEFGHIJ',&lt;/P&gt;&lt;P&gt;      mc2(10) TYPE c .&lt;/P&gt;&lt;P&gt;MOVE mc1 TO mc2 PERCENTAGE 40.&lt;/P&gt;&lt;P&gt;WRITE mc2.&lt;/P&gt;&lt;P&gt;MOVE mc1 TO mc2 PERCENTAGE 40 RIGHT.&lt;/P&gt;&lt;P&gt;WRITE / mc2.&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;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 08:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992465#M74590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T08:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992466#M74591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one way is to use an internal table for the string.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the nth word, split your string into an internal table and then read the nth entry of the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split str at ' '  into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now suppose for 4th word,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab index 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will give you the 4th word in the string...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u dont want to use an internal table then u can also use explicit variables for splitting...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split str at ' '  into f1 f2....fn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use the respective result field&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;PJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 09:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992466#M74591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T09:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992467#M74592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2005 09:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992467#M74592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-14T09:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: reverse a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992468#M74593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Things are always easier than people imagined. Just a hint for getting nth word of a string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: chr  type sychar01,&lt;/P&gt;&lt;P&gt;      str  type string,&lt;/P&gt;&lt;P&gt;      nth  type i value 5,&lt;/P&gt;&lt;P&gt;      len  type i value 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; chr = str+nth(len).&lt;/P&gt;&lt;P&gt; write: / chr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See what will happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 11:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reverse-a-string/m-p/992468#M74593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T11:30:41Z</dc:date>
    </item>
  </channel>
</rss>

