Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replace Function

Former Member
0 Likes
731

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...???

3 REPLIES 3
Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
595

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.

Read only

Former Member
0 Likes
595

You could also use translate:

TRANSLATE gv_string USING '| '.

Read only

Former Member
0 Likes
595

Thank's 4all...

that's work...: TRANSLATE

Flavio Rasseli