<?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: Issue in removing garbage values from string in class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997436#M1896112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use the method &lt;STRONG&gt;xstring_to_solix &lt;/STRONG&gt;in &lt;STRONG&gt;CL_DOCUMENT_BCS &lt;/STRONG&gt;to convert the xstring into string.Apply the replace occurance rule and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kannan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2015 14:05:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-04-13T14:05:27Z</dc:date>
    <item>
      <title>Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997433#M1896109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I am facing some problem while reading XML attachment in class CL_DOCUMENT_BCS.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;While reading &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;contents_hex values &lt;/SPAN&gt;I am getting garbage values like '0000000000000' at end of string.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I tried to convert the xstring values to string&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;and those values became '################################' .&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;But couldn't remove same using all standard process.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;like&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;1) REPLACE all occurrences of '##' IN:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_string WITH '&amp;nbsp; ' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;2) TRANSLATE lv_string&amp;nbsp; using&amp;nbsp; '##&amp;nbsp;&amp;nbsp; '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;However if I copy same string to normal SE38 editor and apply above mentioned approach it works.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;I searched relevant issues posted but couldn't find concrete solution for same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 08:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997433#M1896109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-13T08:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997434#M1896110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;Since it is the end of string, new line or horizontal tab is appearing as '#' values. Try the below code and see if it helps,&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 lv_string WITH space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;~Athreya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 09:08:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997434#M1896110</guid>
      <dc:creator>former_member185613</dc:creator>
      <dc:date>2015-04-13T09:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997435#M1896111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Athreya,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried all below mentioned approach already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;REPLACE &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;ALL &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;OCCURRENCES &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;OF &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;cl_abap_char_utilities&lt;/SPAN&gt;&lt;SPAN class="L0S70" style="font-size: 10pt;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;horizontal_tab &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;IN &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;WITH &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;space&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONDENSE &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;REPLACE &lt;/SPAN&gt;&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 style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;space&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONDENSE &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;REPLACE &lt;/SPAN&gt;&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;cr_lf &lt;SPAN class="L0S52"&gt;IN &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;space&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONDENSE &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;REPLACE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OCCURRENCES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF&amp;nbsp; &lt;/SPAN&gt;cl_abap_char_utilities&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;vertical_tab &lt;SPAN class="L0S52"&gt;IN &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;space&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONDENSE &lt;SPAN style="color: #333333; font-size: 12px;"&gt;lv_string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;none of them removed the garbage values.&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;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 12:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997435#M1896111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-13T12:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997436#M1896112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use the method &lt;STRONG&gt;xstring_to_solix &lt;/STRONG&gt;in &lt;STRONG&gt;CL_DOCUMENT_BCS &lt;/STRONG&gt;to convert the xstring into string.Apply the replace occurance rule and try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kannan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 14:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997436#M1896112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-13T14:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997437#M1896113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kannan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx for your reply.&lt;/P&gt;&lt;P&gt;But as I mentioned in my question I am getting this xstring by &lt;SPAN style="color: #333333; font-size: 12px;"&gt;reading &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: inherit; color: #333333; background-position: initial;"&gt;contents_hex values, which is a solix table only.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:41:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997437#M1896113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-14T08:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997438#M1896114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go into debug and find out the hex values of the # characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997438#M1896114</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-04-14T08:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997439#M1896115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mathew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are appearing as &lt;SPAN style="color: #333333; font-size: 12px;"&gt;'0000000000000'. As I mentioned in my question.&lt;/SPAN&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;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:54:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997439#M1896115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-14T08:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997440#M1896116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, so that &lt;STRONG&gt;is&lt;/STRONG&gt; the hex value. This document explains how to remove the nulls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="45704" __jive_macro_name="document" class="jive_macro_document jive_macro" data-orig-content="To remove spaces/null's from Binary Data (of an internal table/variable) using ABAP" href="https://community.sap.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 09:24:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997440#M1896116</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-04-14T09:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997441#M1896117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx a lot Matthew. It worked. However I am still clueless why Replace of all occurrence didn't work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997441#M1896117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-14T14:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997442#M1896118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because when you type # in the abap editor, that is 0x23 which isn't the same as the null char, 0x00.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 15:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997442#M1896118</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-04-14T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997443#M1896119</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;I'm glad you got the solution already, but if the correct attachment size &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(not including the hex nulls padded to the last entry of solix_tab, in other words)&lt;/SPAN&gt; is known, I'd use CL_BCS_CONVERT=&amp;gt;SOLIX_TO_XSTRING( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Jānis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 15:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997443#M1896119</guid>
      <dc:creator>Private_Member_7726</dc:creator>
      <dc:date>2015-04-14T15:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in removing garbage values from string in class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997444#M1896120</link>
      <description>&lt;P&gt;Hi, maybe for someone will be interesting also this simple approach to remove this "garbage" character from string:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;method remove_garbage_character.
  data lv_white_characters type string.
  lv_white_characters = cl_abap_char_utilities=&amp;gt;get_simple_spaces_for_cur_cp( ).
  data: lv_lenght type i,
        lv_i type i value 0.
  lv_lenght = strlen( lv_white_characters ).
  while lv_i &amp;lt; lv_lenght.
    replace all occurrences of lv_white_characters+lv_i(1) in cv_string with ''.
    lv_i = lv_i + 1.
  endwhile.
endmethod.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;CV_STRING is Changing parameter - TYPE String.&lt;/P&gt;&lt;P&gt;Enjoy, Z&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 12:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-in-removing-garbage-values-from-string-in-class/m-p/10997444#M1896120</guid>
      <dc:creator>former_member272826</dc:creator>
      <dc:date>2021-04-07T12:16:45Z</dc:date>
    </item>
  </channel>
</rss>

