Skip to Content
0

HI, How to replace particular letter in the given text.

Sep 01, 2017 at 05:15 PM

29

avatar image
Former Member

This code replace first letter only.

PARAMETER P_NAME(10) TYPE C.

REPLACE 'A' WITH 'B' INTO P_NAME.

WRITE P_NAME.

i/p:- ASABAP

o/p:- BSABAP

This code replace all 'A' letters into "B'.

PARAMETER P_NAME(10) TYPE C.

REPLACE ALL OCCURRENCES OF 'A' IN P_NAME WITH 'B'.

WRITE P_NAME.

i/p:- ASABAP

o/p:- BSBBBP

MY requirement is

i/p :- ASABAP

o/p:- ASBBAP

Please, Provide suitable code .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Sep 07, 2017 at 12:11 PM
0
  REPLACE 'A' WITH 'B' INTO P_NAME+1.
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank You

0