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 statement

Former Member
0 Likes
897

Hi,

I have found that the 'REPLACE' statement has become obselete.Which is the new keyword we can use for the same.

Rgds

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
861

Hi,

Replace is not Obsolute statement.


REPLACE ALL OCCURRENCES OF '/' IN file_path WITH space

http://help.sap.com/saphelp_nw04/helpdata/EN/71/525f6af6f011d2961c00a0c930660b/frameset.htm

5 REPLIES 5
Read only

Former Member
0 Likes
861

Replace statement is not obselete please see the documentation...

Regards,

Lalit Mohan Gupta

Read only

Former Member
0 Likes
861

Small correction: [REPLACE INTO|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb33cc358411d1829f0000e829fbfe/content.htm] is obsolete, not the [REPLACE|http://help.sap.com/abapdocu_70/en/ABAPREPLACE.htm] statement itself. The last link contains the syntax you should use.

Cheers, harald

Read only

Former Member
0 Likes
861

Try something like following

DATA LV_CAR TYPE CHAR10.
LV_CAR = 'FFFHHHHFGG'.
WRITE :/ LV_CAR.
REPLACE ALL OCCURRENCES OF 'F' IN LV_CAR WITH 'G'.
WRITE :/ LV_CAR.

Read only

Former Member
0 Likes
862

Hi,

Replace is not Obsolute statement.


REPLACE ALL OCCURRENCES OF '/' IN file_path WITH space

http://help.sap.com/saphelp_nw04/helpdata/EN/71/525f6af6f011d2961c00a0c930660b/frameset.htm

Read only

Former Member
0 Likes
861

Hi there

I believe its not the use of the word REPLACE but really the syntax of how to use it that has changed.

Instead of :

REPLACE str1 WITH str2 INTO string.

Now you would say :

Link: [http://help.sap.com/abapdocu_70/en/ABAPREPLACE.htm]

There is more specific detail behind its use this is basically to allow for a more accurate use of the syntax and more control on the output.