<?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: How to remove all whitespaces from a string? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812941#M1781600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;REPLACE &lt;SPAN class="L0S52"&gt;ALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OCCURRENCES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;CL_ABAP_CHAR_UTILITIES&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;newline &lt;SPAN class="L0S52"&gt;in&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variable_name&lt;SPAN class="L0S70"&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;''&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Vijay.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Oct 2013 08:37:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-10-16T08:37:03Z</dc:date>
    <item>
      <title>How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812937#M1781596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to conduct hash check on payment file to see if anyone has changed the payment file manually before signing it with a digital signature.&lt;/P&gt;&lt;P&gt;However when I download the payment file from the server some whitespaces go missing on the way to the client's computer. The problem is that a file that hasn't been modified in any way produces a different hash after signing. So I was thinking what if i removed all whitespaces (space, linefeed, carriage return, nbsp) from the file then maybe it finally calculates correct hash for both files. However I can't find any functionality that lets me remove all whitespace characters from the string. Alpha Conversion removes spaces from the end of the string but since I need to also remove spaces and line breaks from inside the string this isn't really an option. I would greatly appreciate if someone provided me with some information how to achieve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 07:20:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812937#M1781596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-16T07:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812938#M1781597</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;data: teststring type string . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace all occurrences of cl_abap_char_utilities=&amp;gt;CR_LF in teststring with '' .&lt;/P&gt;&lt;P&gt;replace all occurrences of cl_abap_char_utilities=&amp;gt;NEWLINE in teststring with '' .&lt;/P&gt;&lt;P&gt;condense teststring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more options you can explore class CL_ABAP_CHAR_UTILITIES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashish Rawat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 07:30:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812938#M1781597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-16T07:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812939#M1781598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rauno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with &lt;STRONG&gt;REPLACE ALL OCCURRENCES OF pattern IN variable WITH ''&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that I understood well your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 07:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812939#M1781598</guid>
      <dc:creator>paul_max1</dc:creator>
      <dc:date>2013-10-16T07:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812940#M1781599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rauno,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;since I need to also remove spaces and line breaks from inside the string this isn't really an option.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I think you can use the RegEx &lt;SPAN class="qtext400"&gt;&lt;EM&gt;[[:space:]]&lt;/EM&gt; to remove the "white-space characters" from your string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="qtext400"&gt;BR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="qtext400"&gt;Suhas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="qtext400"&gt;PS - You can play around with your RegEx in DEMO_REGEX_TOY &amp;amp; build the one which suits your requirement &lt;SPAN __jive_emoticon_name="cool" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1904/images/emoticons/cool.gif"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 07:40:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812940#M1781599</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2013-10-16T07:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812941#M1781600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;REPLACE &lt;SPAN class="L0S52"&gt;ALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OCCURRENCES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;CL_ABAP_CHAR_UTILITIES&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;newline &lt;SPAN class="L0S52"&gt;in&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variable_name&lt;SPAN class="L0S70"&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;''&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Vijay.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 08:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812941#M1781600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-16T08:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove all whitespaces from a string?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812942#M1781601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are all good suggestions but afterall I went with something I made myself especially because I can be sure that this way all the unnecessary characters are removed and necessary characters remain:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;strlen&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;initial_file &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DO &lt;/SPAN&gt;len &lt;SPAN class="L0S52"&gt;TIMES&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUBTRACT &lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-size: 10pt;"&gt;1 &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;FROM len&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-size: 10pt;"&gt;'ABCDEFGHIJKLMNOPQRSŠZŽTUVÕÄÖÜXY1234567890.,"&amp;lt;&amp;gt;?=-:/' &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;CS &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;initial_file+len&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-size: 10pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONCATENATE &lt;/SPAN&gt;initial_file+len&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;temp &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;temp&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;ENDDO&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 10:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-remove-all-whitespaces-from-a-string/m-p/9812942#M1781601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-16T10:44:58Z</dc:date>
    </item>
  </channel>
</rss>

