<?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 ALL OCCURRENCES = Short dump! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341028#M1230177</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;Try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: g_string TYPE char30 VALUE '     ABC  def       ',
      g_index  TYPE sy-index.

TRANSLATE g_string TO UPPER CASE.

DO 30 TIMES.

  g_index = sy-index - 1.

  IF g_string+g_index(1) = ' '.

    REPLACE space IN g_string+g_index(1) WITH '_'.

  ENDIF.

ENDDO.

BREAK-POINT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2009 04:30:20 GMT</pubDate>
    <dc:creator>asik_shameem</dc:creator>
    <dc:date>2009-03-20T04:30:20Z</dc:date>
    <item>
      <title>REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341023#M1230172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting confused around the REPLACE ALL OCCURRENCES command..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;basically..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field that i need to convert to CAPS and replace the "spaces" with "_"&lt;/P&gt;&lt;P&gt;But my lack of abap skills = Short dump!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this short dump hinted that the field was to blame as it was String (0).. so i thought i would move into the CHAR30 field as it would be no longer than 30 characters...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    MOVE GS_SPECIFIC_CAMPAIGN-CAMPAIGN_NAME TO GW_CAMPAIGN_NAME.

        TRANSLATE GW_CAMPAIGN_NAME TO UPPER CASE.
        REPLACE ALL OCCURRENCES OF SPACE IN GW_CAMPAIGN_NAME WITH '_'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this still results in the short dump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime Errors REPLACE_INFINITE_LOOP&lt;/P&gt;&lt;P&gt;Exception CX_SY_REPLACE_INFINITE_LOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe i am missing something but the error said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure that the command "REPLACE ALL OCCURENCES OF ..." is not executed with a search string of length 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the same command, but only for populating variables into a text string...  that is replacing &amp;amp;1 rather than a space!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try the REGEX command i also found in keyword search but that resulted in a different short dump!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i missing something obvious??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 23:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341023#M1230172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T23:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341024#M1230173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: c_space type space.

if not GW_CAMPAIGN_NAME is initial.
TRANSLATE GW_CAMPAIGN_NAME TO UPPER CASE.
        REPLACE ALL OCCURRENCES OF c_SPACE IN GW_CAMPAIGN_NAME WITH '_'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 23:20:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341024#M1230173</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-19T23:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341025#M1230174</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 following should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE GS_SPECIFIC_CAMPAIGN-CAMPAIGN_NAME TO GW_CAMPAIGN_NAME.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        TRANSLATE GW_CAMPAIGN_NAME TO UPPER CASE.&lt;/P&gt;&lt;P&gt;        TRANSLATE GW_CAMPAIGN_NAME USING ' _'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the space before the underscore above ' _', this should replace all occurrences of space with an underscore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Che&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 23:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341025#M1230174</guid>
      <dc:creator>che_eky</dc:creator>
      <dc:date>2009-03-19T23:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341026#M1230175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can see i define pattern with char2,so pattern = space + '_', try it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: out       TYPE string VALUE 'DO you hear me!!!',
          pattern  TYPE char2 VALUE ' _'.
TRANSLATE out USING pattern.
WRITE out.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 02:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341026#M1230175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T02:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341027#M1230176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;CONDENSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE GW_CAMPAIGN_NAME NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 02:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341027#M1230176</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2009-03-20T02:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341028#M1230177</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;Try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: g_string TYPE char30 VALUE '     ABC  def       ',
      g_index  TYPE sy-index.

TRANSLATE g_string TO UPPER CASE.

DO 30 TIMES.

  g_index = sy-index - 1.

  IF g_string+g_index(1) = ' '.

    REPLACE space IN g_string+g_index(1) WITH '_'.

  ENDIF.

ENDDO.

BREAK-POINT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 04:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341028#M1230177</guid>
      <dc:creator>asik_shameem</dc:creator>
      <dc:date>2009-03-20T04:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341029#M1230178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope this helps you ... as this solution is not so performing you can use this incase u still have the dump problem. in the while if i get any good solution i will reply back . just copy paste and try out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wf_string type string value 'I  am  so  sweet'.&lt;/P&gt;&lt;P&gt;data : wf_string_tmp type string .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type table of string.&lt;/P&gt;&lt;P&gt;data : wf_itab like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split wf_string at wf_space into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wf_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-tabix EQ 1.&lt;/P&gt;&lt;P&gt;  wf_string_tmp = wf_itab.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  concatenate wf_string_tmp wf_itab into wf_string_tmp separated by '_'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / wf_string_tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--- Close the post once you get the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 04:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341029#M1230178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T04:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341030#M1230179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;It seems ok just you should add few things like &lt;/P&gt;&lt;P&gt;if not GS_SPECIFIC_CAMPAIGN-CAMPAIGN_NAME is initial.&lt;/P&gt;&lt;P&gt;    MOVE GS_SPECIFIC_CAMPAIGN-CAMPAIGN_NAME TO GW_CAMPAIGN_NAME.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        TRANSLATE GW_CAMPAIGN_NAME TO UPPER CASE.&lt;/P&gt;&lt;P&gt;        REPLACE ALL OCCURRENCES OF SPACE IN GW_CAMPAIGN_NAME WITH '_'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 05:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341030#M1230179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T05:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341031#M1230180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 06:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341031#M1230180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T06:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341032#M1230181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the following example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT it_otfdata1 INTO wotfdata .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REPLACE ALL OCCURRENCE OF 'DUPLICATE' IN wotfdata-tdprintpar WITH 'ORIGINAL'.&lt;/STRONG&gt;IF sy-subrc = 0.*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODIFY it_otfdata1 FROM wotfdata INDEX sy-tabix TRANSPORTING tdprintpar.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDLOOP&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 06:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341032#M1230181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T06:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341033#M1230182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed the work area back to a String and then used the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    MOVE GS_SPECIFIC_CAMPAIGN-CAMPAIGN_NAME TO GW_CAMPAIGN_NAME.
    TRANSLATE GW_CAMPAIGN_NAME TO UPPER CASE.
    TRANSLATE GW_CAMPAIGN_NAME USING ' _'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all done and working!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some interesting ways of doing it though!  thanks for you feedback!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 09:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341033#M1230182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T09:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341034#M1230183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what I suggested. Glad it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Che&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 10:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341034#M1230183</guid>
      <dc:creator>che_eky</dc:creator>
      <dc:date>2009-03-20T10:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE ALL OCCURRENCES = Short dump!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341035#M1230184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your suggestion worked for 95% ;o]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to change the TEXT30 back to a String to remove the trailing ____________&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2009 12:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-all-occurrences-short-dump/m-p/5341035#M1230184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-20T12:53:31Z</dc:date>
    </item>
  </channel>
</rss>

