cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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 .

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos
  REPLACE 'A' WITH 'B' INTO P_NAME+1.
Former Member
0 Kudos

Thank You

Answers (0)