‎2007 Jan 18 12:17 PM
Hi,
I am working on 4.6c version, which is not supporting below syntax.
REPLACE ALL OCCURRENCES OF ',' IN wa_output-netwr WITH ''.
REPLACE ALL OCCURRENCES OF '.' IN wa_output-netwr WITH ''.
how to i change this above statemnet to execute.
Thanks in advance
‎2007 Jan 18 12:39 PM
Hi,
Here's your solution...
DATA: wv_var(20) type C.
wv_var = 'aze,rty,qwe,,rty'.
WRITE:/ wv_var.
TRANSLATE wv_var USING ', '. "do not forget the space after coma!
WRITE:/ wv_var.
CONDENSE wv_var NO-GAPS.
WRITE:/ wv_var.Regards
Mickael
‎2007 Jan 18 12:24 PM
wihout having any coding also u can replace the same with ctrl+f where in u can replace i suppose
praveen
‎2007 Jan 18 12:24 PM
Hello,
The REPLACE statement will only replace the first hit on the string. You can also do a loop using the replace.
while sy-subrc = 0.
REPLACE '.' WITH ' ' INTO wa_netwr.
REPLACE ',' WITH ' ' INTO wa_netwr.
endwhile.
If useful reward.
Vasanth
‎2007 Jan 18 12:25 PM
Hi Prakash ,
What is the new value you want in place of , .
If that is " then try ''''.
Regadrs
Arun
‎2007 Jan 18 12:25 PM
Hi,
Use the statement as bleow...
REPLACE ALL OCCURRENCES OF 'abc' IN myText WITH 'XYZ'.
Regards,
Ram
‎2007 Jan 18 12:40 PM
Hi,
You might also cosider the TRANSLATE command.
Pls check http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33a5358411d1829f0000e829fbfe/frameset.htm for details.
Eddy
-
Pimp up the S(D)N site and earn points. Check this <a href="/people/eddy.declercq/blog/2007/02/01/pimp-up-the-jam log</a> for details
‎2007 Jan 18 12:39 PM
Hi,
Here's your solution...
DATA: wv_var(20) type C.
wv_var = 'aze,rty,qwe,,rty'.
WRITE:/ wv_var.
TRANSLATE wv_var USING ', '. "do not forget the space after coma!
WRITE:/ wv_var.
CONDENSE wv_var NO-GAPS.
WRITE:/ wv_var.Regards
Mickael