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

ABAP # Character Problem

acamli
Explorer
0 Likes
2,671

Hi everyone,

I am making a pr list report that will be mailed every day as excel. We have a RFC functions.

If someone uses the enter key in the description section while opening pr on the website, it appears as # character on the abap screen. When I try to change it with the TRANSLATE command, I cannot succeed. How can I fix this character?

Thanks.

1 ACCEPTED SOLUTION
Read only

acamli
Explorer
0 Likes
2,554

REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>CR_LF+1 IN acklm_str WITH space.

It was solved. Thanks.

8 REPLIES 8
Read only

acamli
Explorer
0 Likes
2,554

I want to add more details;

If someone write normally # character, my code change this.

Read only

abo
Active Contributor
2,554

The # character is a placeholder for anything that cannot be displayed: you need to look at the hex representation to find out what it is exactly

Read only

acamli
Explorer
0 Likes
2,554

Do you know any function for string to hex ?

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,554

It's not #, it's the newline character in ABAP (as it can't be displayed by debugger, SAP replaces it with #).

replace all occurrences of |\n| in acklm_str with |?|.

\n is Unicode character U+000A (newline)

Read only

abo
Active Contributor
0 Likes
2,554

acamli you don't need it, it's right in the debugger to the right of the red box.

Read only

acamli
Explorer
0 Likes
2,555

REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>CR_LF+1 IN acklm_str WITH space.

It was solved. Thanks.

Read only

Sandra_Rossi
Active Contributor
2,554

which is the same as (valid as of ABAP 7.02):

replace all occurrences of |\n| in acklm_str with | |.
Read only

2,554

sandra.rossi probably it is same but our SAP version did not support.