<?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: Replace characters between &amp;lt; &amp;gt; with single * in variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659985#M1287397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey jigar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any part of the text fix e.g. 'Wage Type'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2009 13:59:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-29T13:59:20Z</dc:date>
    <item>
      <title>Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659981#M1287393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to replace all characters between &amp;lt;  &amp;gt; with *. Data is stored in variable type char255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose variable contains : Wage Type &amp;lt;Wage Type&amp;gt; Not Valid For Interface ID &amp;lt;ID&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want output as Wage Type * Not Valid For Interface ID *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jigar Thakkar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 13:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659981#M1287393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T13:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659982#M1287394</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;Wage Type &amp;lt;Wage Type&amp;gt; Not Valid For Interface ID &amp;lt;ID&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE  &amp;lt;Wage Type&amp;gt; WITH '*' INTO l_string.
 REPLACE &amp;lt;ID&amp;gt; WITH '*' INTO l_string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this you are looking for ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 13:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659982#M1287394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T13:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659983#M1287395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jigar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to replace parts of a variable type string or c do this (example):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZREPLACE
Data text type string.

text = 'Token 1, Token 2, Token 3, Token 4'.

while sy-subrc = 0.
   replace ',' with '-' into text.
endwhile.

* to check it is correct
write / text.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 13:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659983#M1287395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T13:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659984#M1287396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text inside &amp;lt; &amp;gt; is not fixed. So i Can't hardcode values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some dynamic code wich will replace character inside  &amp;lt; &amp;gt; with *  irrespective of text inside &amp;lt; &amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jigar Thakkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 13:55:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659984#M1287396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T13:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659985#M1287397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey jigar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any part of the text fix e.g. 'Wage Type'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 13:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659985#M1287397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T13:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659986#M1287398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create new variables. Put "Wage Type" into the first, "Not Valid For Interface ID" into another and than concatenate them with "*" in between.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 14:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659986#M1287398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T14:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659987#M1287399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jigar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the length of the string and use DO...ENDDO statement. Inside the loop, didnt consider the text between &amp;lt; and &amp;gt; and move to another string and add * when  &amp;gt; is encountered in the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:
  gv_len type i,
  gv_str type string value 'Wage Type &amp;lt;Wage Type&amp;gt; Not Valid For Interface ID &amp;lt;ID&amp;gt;',
  gv_rep_str type string,
  gv_flag type char1,
  gv_index type sy-index.
gv_len = strlen( gv_str ).
do gv_len times.
gv_index = sy-index - 1.
if gv_str+gv_index(1) = '&amp;lt;'.
gv_flag = 'X'.
continue.
elseif gv_str+gv_index(1) = '&amp;gt;'.
clear gv_flag.
concatenate gv_rep_str '*' into gv_rep_str.
continue.
elseif gv_flag is initial.
concatenate gv_rep_str gv_str+gv_index(1) into gv_rep_str.
endif.
enddo.
write:/ gv_rep_str.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinaykumar G on May 29, 2009 8:04 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 14:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659987#M1287399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Replace characters between &lt; &gt; with single * in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659988#M1287400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;first find your length of your field using strlen(field) then you can put * in the first and last field correspondingly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 14:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-characters-between-lt-gt-with-single-in-variable/m-p/5659988#M1287400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T14:34:34Z</dc:date>
    </item>
  </channel>
</rss>

