views:

61

answers:

1

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!

+2  A: 

The function TR_GET_IS_UNICODE_SYSTEM indicate if the system is using unicode or not. It calls the CL_ABAP_CHAR_UTILITIES class to get the CHARSIZE attribute (bite/char) (by the way, this class contains a CR_LF public attribute...)

Regards
Guillaume

PATRY