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 WebAS Active Codepage

Former Member
0 Likes
494

Hello!

I need to concatenate different lines in a string.

To do so, I need to use CR + LF hexadecimal characters.

The problem is that, when I'm using an 8 bit/char environment, I just need to do something like this:



constants : c_lf type x value '10'.

constants : c_cr type x value '13'.

data : g_html type string.

concatenate '<html>' c_cr c_lf into g_html.

but, when I'm in a 16 bit/char environment, the X variable does not represent the correct hexadecimal representation for CR and LF.

So, I should use something like this:



constants : c_lf(2) type x value '0010'.

constants : c_cr(2) type x value '0013'.

data : g_html type string.

concatenate '<html>' c_cr c_lf into g_html.

So, there is any way to find out the amount of bytes/char in use by ABAP WebAS?

Thanks!

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
461

Have you checked this ( I think you are in ECC 6)


class CL_ABAP_CHAR_UTILITIES definition load.
CRLF = CL_ABAP_CHAR_UTILITIES => CR_LF.

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
462

Have you checked this ( I think you are in ECC 6)


class CL_ABAP_CHAR_UTILITIES definition load.
CRLF = CL_ABAP_CHAR_UTILITIES => CR_LF.

Read only

Sm1tje
Active Contributor
0 Likes
460

Not quite sure, but can't you use:

CL_ABAP_CHAR_UTILITIES=>CHARSIZE

If it is 1, you have a non-unicode system, otherwise it is 2, you have a unicode system.

Read only

Former Member
0 Likes
460

Thank you very much guys!