Skip to Content
avatar image
Former Member

Replace Function

Hi!

I'm trying to make a function for replace all specific characters ('|' pipe, in this case) for space in a string, but i don't find a function(s) to do it. My release is 4.6C

Maybe in newer release exist a function to do it.

Somebody help's...???

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 23, 2004 at 08:08 PM

    In 4.7 you can use this

    replace all occurrences of '|' in gv_string with new.

    If this does not work in 4.6c, try this one

    clear sy-subrc.

    while sy-subrc eq 0.

    replace '|' with new into gv_string.

    endwhile.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2004 at 08:12 PM

    You could also use translate:

    TRANSLATE gv_string USING '| '.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2004 at 08:39 PM

    Thank's 4all...

    that's work...: TRANSLATE

    Flavio Rasseli

    Add comment
    10|10000 characters needed characters exceeded