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

Replcae All Command Not working

Former Member
0 Likes
446

Hi,

I used "REPLACE ALL OCCURRENCES OF '#' in itab1-address with space"

command inside a internal table and the result works in DEV

but failing in PRD -Can any one help me in this regard ???

One more thing - If I edit the address field in PRD and apply the above replace command to eluminate the junk characters '#' on the same field then

it works fine ...

Strange - Please help !

Regards

Anu.

2 REPLIES 2
Read only

Former Member
0 Likes
411

George,

Just check if this "#" value is Hexadecimal value. "If so then you cannot just replace uisng replace command. Because string "#" is differnt than HEX "#"...you need to compare this value with hex value and then used replace command.

If you are getting this values after uploading file...make sure your uploading mode is ASC...you can eliminate this values.

Hope this will help.

Nilesh

Read only

Former Member
0 Likes
411

Hi All....... This may helpfully for ABAP Programmers in future....

Remove special characters which doesn't work with normal REPLACE ALL command... Try This...

Data : A(35) type C,

B(35) type C,

clear : A,B.

CLASS cl_abap_char_utilities DEFINITION LOAD.

A = address1.

concatenate A cl_abap_char_utilities=>cr_lf INTO B.

REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf In B WITH space.

address1 = B.

Regards

Edited by: George Peter on Jan 31, 2008 8:41 PM