cancel
Showing results for 
Search instead for 
Did you mean: 

Identifying '##' in string entered in textEdit

Former Member
0 Kudos

Hi All,

I have a requirement to save text entered by the user in textEdit into an internal table.

The textedit uses '##' to identify a carriage return. However if I try using String operator CS to search for the '##' it fails to identify it.

Is the '##' stored internally as some other data type? I need to break the string entered by the user at '##' and store each such substring in a new line of the internal table.

Any pointers in this regard would be appreciated.

Regards,

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

eddy_declercq
Active Contributor
0 Kudos

Hi,

You have to check on CL_ABAP_CHAR_UTILITIES=>CR_LF

Pls check also /people/eddy.declercq/blog/2005/11/29/careful-with-that-axe-eduard for splitting text into tables.

Eddy

Former Member
0 Kudos

Thanks Eddy!

CL_ABAP_CHAR_UTILITIES=>CR_LF solved my problem.

eddy_declercq
Active Contributor
0 Kudos

Glad it helped

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Do you want to know why you couldn't just use CS on '##'?

You see the carrige return isn't actually represented by '##'. It has a separate hex code of its own. However this hex code has no human readable representation. In ABAP, non-printable hex values are generally replaced in display with the '#' character. This can be a good sign that you have a non-printable character in your stream. You can always use the hex view in the debugger to see what the actual hex code is for a particular character.

All the class CL_ABAP_CHAR_UTILITIES does is allow you to work with the correct hex codes by simply referencing the class attributes.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello All,

Actually the issue we have is that the R3 system that we are using is 4.6c.

And this class is not present in this version of the R3.

Can anyone help us on this issue, please.

Thanks and have a great day!

former_member184494
Active Contributor
0 Kudos

did you try the other options like CP , etc ? or try translating the same to some other character , ...

best would be to put the string directly into a table and find out what the table actually has , maybe there is some translation going on in the backend?

Arun