‎2010 May 05 10:52 AM
Dear Guru ,
Does SAP provide the standard function that can replace the special characters in String ?
For example :
I have one template string : " & & & & & output(s) have not been processed yet ! " and five parameters : "P1" , "P2" , "P3" , "P4" , "P5" .
And i would like to apply all parameters into the string to replace the "&" character . Is it possibile ?
My idea is sourcing from the Message String that in tcode : SE91 .
Thanks .
Best Regards,
Carlos Zhang
‎2010 May 05 11:07 AM
Hi if the template is fixed
There is a tricky way like ,
create a message no in message class with & & & & &.
data:text type bapi_msg.
message ID 'ZSD'
type 'E'
number '901'
with p1 p2 p3 p4
into text.
write text.
‎2010 May 05 11:00 AM
‎2010 May 05 11:00 AM
Hi Carlos
Have you tryed with the REPLACE statement??or press F1 on REPLACE for more help?
regards
Marco
‎2010 May 05 11:03 AM
Hi Carlos,
I think instead of a standard FM you can write a one line command to do this job.
E.g.
constant: str1 type string value 'output(s) have not been processed yet ! '.
data: var1 type c,
var2 type c,
var3 type c,
var4 type c,
str type string.
concatenate var1 var2 var3 var4 str1 into str separated by space.
So str will have the final value.
Thanks,
Mainak
‎2010 May 05 11:05 AM
‎2010 May 05 11:07 AM
Hi if the template is fixed
There is a tricky way like ,
create a message no in message class with & & & & &.
data:text type bapi_msg.
message ID 'ZSD'
type 'E'
number '901'
with p1 p2 p3 p4
into text.
write text.