<?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 Replace beside first character in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197841#M1981440</link>
    <description>&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;String handling in ABAP link can help. &lt;A href="https://www.tutorialscampus.com/tutorials/sap-abap/sap-abap-strings.htm" target="_blank"&gt;Stings in SAP&lt;/A&gt; and &lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/String+Processing" target="_blank"&gt;String processing in SAP through ABAP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abinath&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 08:05:52 GMT</pubDate>
    <dc:creator>Abinathsiva</dc:creator>
    <dc:date>2020-03-16T08:05:52Z</dc:date>
    <item>
      <title>String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197840#M1981439</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am new to ABAP and I need some help for a project.&lt;/P&gt;
  &lt;P&gt;I have some data (NAME1, NAME2), the value is a string for example John Doe.&lt;/P&gt;
  &lt;P&gt;I need to anonymize this data because its showing on some reports, so I want to make a check and take all the values and change them in J*** D** , i need 1st letter to stay unchanged and the rest of the characters to be changed to ' * ' .&lt;/P&gt;
  &lt;P&gt;I need to make this to a whole table with names.&lt;/P&gt;
  &lt;P&gt;I know that i need to use REPLACE IN WITH statement but i don't know how to keep the first character and change the others.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 07:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197840#M1981439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-03-16T07:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197841#M1981440</link>
      <description>&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;String handling in ABAP link can help. &lt;A href="https://www.tutorialscampus.com/tutorials/sap-abap/sap-abap-strings.htm" target="_blank"&gt;Stings in SAP&lt;/A&gt; and &lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/String+Processing" target="_blank"&gt;String processing in SAP through ABAP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abinath&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 08:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197841#M1981440</guid>
      <dc:creator>Abinathsiva</dc:creator>
      <dc:date>2020-03-16T08:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197842#M1981441</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE ALL OCCURRENCES OF REGEX '\B.' IN name1
                      WITH '*'.
or 

name1 = replace( val = name1 with = '*' regex = '\B.' occ = '0' ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 08:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197842#M1981441</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2020-03-16T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197843#M1981442</link>
      <description>&lt;P&gt;For information, the &lt;A href="https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/index.htm?file=abenregex_syntax_specials.htm"&gt;regular expression&lt;/A&gt; \B. means any character (.) which is inside the boundary characters of a word (\B).&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 08:54:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197843#M1981442</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-16T08:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197844#M1981443</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;data: name1 type char10,
      name2 type char10,
      v1 type char1,
      v2 type char1.


name1 = 'John'.
name2 = 'Deo'.
v1 = name1.
v2 = name2.

concatenate v1'***' v2'***' into name1.
break-point.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1791572-string.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 09:14:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197844#M1981443</guid>
      <dc:creator>irfanjazz1</dc:creator>
      <dc:date>2020-03-16T09:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197845#M1981444</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can try this - I tried this - it works -  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;name1 = 'ALLEXCEPTFIRSTCHAR'.
mask_length = strlen( my_var ) - 1.    
name1 = replace( val = name1
                  off = 1
                  len = mask_length
                  with = repeat( val = '*' occ = mask_length ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tested it and it is working as expected.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 09:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197845#M1981444</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-16T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197846#M1981445</link>
      <description>&lt;P&gt;Found the answer, thank you&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197846#M1981445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-03-16T11:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197847#M1981446</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Hope this works for you&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:41:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197847#M1981446</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-16T11:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197848#M1981447</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;DATA : var1 type string VALUE 'John Doe'
      , var2 TYPE string
       , varfinal TYPE char32
       , varfinal1 TYPE char32
       , varfinal2 TYPE char32
       , str TYPE char32
       , len TYPE i
       , len1 type i.

SPLIT var1 at space INTO : data(str1) data(str2)  .
len = strlen( str1 ).
len1 = len - 1.
var2 = repeat( val = '*' occ = len1 ).

CONCATENATE str1(1) var2 into varfinal1.
*write : ' Anonymous Text is :' , varfinal1.

len = strlen( str2 ).
len1 = len - 1.
var2 = repeat( val = '*' occ = len1 ).
CONCATENATE str2(1) var2 into varfinal2.
*write : ' Anonymous Text is :' , varfinal2.
CONCATENATE varfinal1 varfinal2 INTO varfinal SEPARATED BY space.
write : ' Anonymous Text is :' , varfinal.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:53:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197848#M1981447</guid>
      <dc:creator>former_member641357</dc:creator>
      <dc:date>2020-03-16T11:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197849#M1981448</link>
      <description>&lt;P&gt;result is : &lt;/P&gt;&lt;P&gt;Anonymous Text is : J*** D**&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:55:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197849#M1981448</guid>
      <dc:creator>former_member641357</dc:creator>
      <dc:date>2020-03-16T11:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: String Replace beside first character</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197850#M1981449</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;If you find the answer, please mark the right one and close the thread. Curios to know that &lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 14:04:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-replace-beside-first-character/m-p/12197850#M1981449</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-16T14:04:08Z</dc:date>
    </item>
  </channel>
</rss>

