<?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: Doubt on String Operations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339708#M1229976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks a lot. Your logic of Translate command worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Balakrishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I think the logic which you said works only in versions which are greater than 4.7, it didn't worked for me even i tried to do it in notepad. Anywayz thanks a lot for the suggestions given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2009 13:14:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-18T13:14:19Z</dc:date>
    <item>
      <title>Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339694#M1229962</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 have a requirement in which i have to replace the character '|' with blank space. I have used the following command to replace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace All occurrences of '|' in v_text1 with ' ' (Instead of Quotes i tried with SPACE option also) but it is not inserting blank space in between the characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me out in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339694#M1229962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339695#M1229963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE ALL OCCURRENCES OF '|' WITH ' '.   " give space using (Altkey+255)
                                                                          "using Alt key+255 it gives a single space&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:20:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339695#M1229963</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2009-03-18T12:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339696#M1229964</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;  Thanks for the reply. Could you please put a sample code for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:27:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339696#M1229964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339697#M1229965</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;what balakrishna said will work perfectly fine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try doing it like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE ALL OCCURRENCES OF '|' IN w_string WITH '&amp;nbsp;'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of pressing space bar, hold the alt key and press 255. it will automatically give you the space, its the ASCII key value of space (ALT + 255).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that will definitely work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sarves&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:31:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339697#M1229965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339698#M1229966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;   Use the above syntax, instead of typing space bar for space use (Alt key+255) means Alt key on key board holding that Alt key press numbers 255, the remove finger from Alt key it will give u a space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339698#M1229966</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2009-03-18T12:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339699#M1229967</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;whats the data type of v_text1? try string. it works for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or try simply "Replace '|' into v_text1 with '  '." but it'l replace only once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:38:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339699#M1229967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339700#M1229968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;try out this code it works for me &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : a type string VALUE 'ABC|def|GHR|hgashdfk'.
data : c type string .
data : b type c VALUE '|'.
replace ALL OCCURRENCES of '|' in a with '&amp;nbsp; '. " as bala krishan told press the key alt and type 255 .

write : a.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;chinnaiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339700#M1229968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339701#M1229969</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;There is another option also to do the same but bit lenghty:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:Len type i,
         Counter type i,
         String1(10) type c value 'Iadsfdiadsfdifd',
         String2(10) type c.

Len = STRLEN ( String1 ).
Counter = 0.
while Countre LT Len.
if String1+Counter(1) EQ 'i'.
Concatenate String2 ' ' into String2.
else.
Concatenate String2  String1 into String2.
endif.
Write String2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this might help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339701#M1229969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339702#M1229970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balakrishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have tried the below code by using ALT+255, but it didnt gave me any space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: v_text1 type string,&lt;/P&gt;&lt;P&gt;      v_text2 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_text1 = 'ABC*DEF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move v_text1 to v_text2.&lt;/P&gt;&lt;P&gt;replace all occurrences of '*' in v_text2 with ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; write:/ v_text1, v_text2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:48:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339702#M1229970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339703#M1229971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Haritha,&lt;/P&gt;&lt;P&gt;                ALT+255 will give a space, its ASCII format, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open a Notepad and write AB, place the cursor after A, and hold ALT key on keyboard, and press number 255 then remove finger from ALT key, you will see a space between A and B now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use same in the REPLACE statement to get space. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339703#M1229971</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2009-03-18T12:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339704#M1229972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, after pressing the number 255, u have to hold the alt for a while and then release your finger. Try in numeric pad of keyboard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 12:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339704#M1229972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T12:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339705#M1229973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Haritha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is the following: Character fields (data type c) cannot have blank spaces at the right side of the field. Thus, the character field ' ' which is used to replace the '|' character is actually ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a string instead, the code should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: gv_text1(20) TYPE c VALUE 'This|is|my|sample'.

* Replace | character with spaces
REPLACE ALL OCCURRENCES OF '|' IN gv_text1 WITH ` `.

WRITE gv_text1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339705#M1229973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339706#M1229974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please use the TRANSLATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA text TYPE string.&lt;/P&gt;&lt;P&gt;text = `ABC|def|GHR|hgashdfk`.&lt;/P&gt;&lt;P&gt;TRANSLATE text USING '| '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output: ABC def GHR hgashdfk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So TRANSLATE, replaces all the '|' with SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339706#M1229974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339707#M1229975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The below statement also works, however there is a twist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF '|' IN gv_text1 WITH ` `.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The space ` `, these characters are under the tilde sign on the keyboard, these are not the single quotes(see the difference, single quote ('), the other one is (`).&lt;/P&gt;&lt;P&gt;If you you ' ', the statement does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF '|' IN gv_text1 WITH ' '. "Does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works:&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF '|' IN gv_text1 WITH ` `. " works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you issue will be solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339707#M1229975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Doubt on String Operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339708#M1229976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks a lot. Your logic of Translate command worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Balakrishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I think the logic which you said works only in versions which are greater than 4.7, it didn't worked for me even i tried to do it in notepad. Anywayz thanks a lot for the suggestions given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 13:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/doubt-on-string-operations/m-p/5339708#M1229976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T13:14:19Z</dc:date>
    </item>
  </channel>
</rss>

