cancel
Showing results for 
Search instead for 
Did you mean: 

Can nyone describe attributes of class CL_ABAP_CHAR_UTILITIES

Former Member
0 Kudos

Hi All,

Can anyone plz describe all the attributes of the class CL_ABAP_CHAR_UTILITIES like BYTE_ORDER_MARK_UTF8, CR_LF, MAXCHAR etc in detail i.e. when these are used and in which situations can we use them ?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

some of you might not have the documentation available in EN, so pls dont mind posting big answer this



BYTE_ORDER_MARK_LITTLE


You can write this byte sequence in a type X or XSTRING container to
show that the byte sequence is little-endian. The byte sequence is the
little-endian format of Unicode character FEFF

BYTE_ORDER_MARK_BIG


You can write this byte sequence in a type X or XSTRING container to
show that the byte sequence is big-endian. This byte sequence mark is
the Unicode character FEFF.

BYTE_ORDER_MARK_UTF8



You can write this byte sequence in a type X or XSTRING container to
show that the characters in the container are in UTF-8. The byte
sequence is the UTF-8 format of the Unicode character FEFF.

CHARSIZE



CHARSIZE is the factor, by which you multiply the declared length of a
type C field to obtain the size of the field in bytes. In a non-Unicode
system, CHARSIZE has the value 1.

ENDIAN



Current Byte order ('B' for big-endian or 'L' for little-endian,
depending on the operating system of the application server).

See also, domain ABAP_ENDIA in the Dictionary.

MINCHAR



You can use MINCHAR and MAXCHAR in binary comparisons (SORT statement
without AS TEXT addition; IF with operators <, >, <=, >=;
BETWEEN;comparison with a selection criterion IF f IN sel). CLEAR f WITH
MINCHAR fills f with a value that is smaller than or equal to all
character sets.

However, binary comparisons often do not meet the user's expectations;
for example, ISO-8859-1 has the character set 1 < A < Z < a <Ä < ü while
EBCDIC (SAP character set 0120) has Ä < a < A < ü < Z < 1.

Notes

MINCHAR is generally not a valid character of the current character

set. In particular, you must not use TRANSLATE f TO UPPER CASE on
MAXCHAR. The same applies to operations that implicitly convert to upper
case, such as SEARCH, CS, NS, CP, or NP. You must not use character set
conversions on MAXCHAR.

It is not guaranteed that MINCHAR is displayed as # on screens. In some
cases the system treats MINCHAR as the end of a text field.

MAXCHAR



You can use MINCHAR and MAXCHAR in binary comparisons (SORT statement
without AS TEXT addition; IF with operators <, >, <=, >=; BETWEEN;
comparison with a selection criterion IF f IN sel). CLEAR f WITH MAXCHAR
fills f with a value that is larger than or equal to all character sets.

However, binary comparisons often do not meet the user's expectations;
for example, ISO-8859-1 has the character set 1 < A < Z < a <Ä < ü while
EBCDIC (SAP character set 0120) has Ä < a < A < ü < Z < 1.

Notes

MAXCHAR is generally not a valid character of the current character set.
In particular, you must not use TRANSLATE f TO UPPER CASE on MAXCHAR.
The same applies to operations that implicitly convert to upper case,
such as SEARCH, CS, NS, CP, or NP. You must not not use character set
conversions on MAXCHAR.

HORIZONTAL_TAB


Description

Tab character in the system character set

Notes

This character is typically used in files. It can be used in connection
with the READ DATASET and TRANSFER statements as well as the
CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how
to treat this character in RFCs, with procedures or statements such as
WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is
especially relevant to the conversion between EBCDIC and ACSII.

This character cannot be displayed on ABAP lists or screens.

VERTICAL_TAB




Description

Vertical tab stop character in the system character set

Notes

This character is typically used in files. It can be used in connection
with the READ DATASET and TRANSFER statements as well as the
CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how
to treat this character in RFCs, with procedures or statements such as
WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is
especially relevant to the conversion between EBCDIC and ACSII.

This character cannot be displayed on ABAP lists or screens.

NEWLINE



Description

This character serves as an end of line character in the system
character set.

If you use the TRANSFER statement to write this character to a file
opened in TEXT MODE, the system, in Microsoft Windows, automatically
writes a CR/LF pair (Carriage Return/Line Feed) into the file; for
further details refer to the keyword documentation for OPEN DATASET.



Notes

This character is typically used in files. It can be used in connection
with the READ DATASET and TRANSFER statements as well as the
CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how
to treat this character in RFCs, with procedures or statements such as
WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is
especially relevant to the conversion between EBCDIC and ACSII.

This character cannot be displayed on ABAP lists or screens.

CR_LF




Description

This attribute contains a CR/LF pair (Carriage Return/Line Feed) in the
system character set.

If a string or field with type C is converted to a Microsoft character
set or UTF-8 (using the class CL_ABAP_CONV_OUT_CE), this character set
is converted to the CR/LF sequence that can be used as an end of line
character in Microsoft Windows.

Notes

You should not use the CR_LF attribute to write an end of line character
into a file that was opened in Microsoft Windows in TEXT MODE. Use the
NEWLINE attribute instead.

These characters are typically used in files. The CR_LF attribute can be
used in connection with the CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how
to treat this character in RFCs, with procedures or statements such as
WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is
especially relevant to the conversion between EBCDIC and ACSII.

The CR/LF characters cannot be displayed on ABAP lists or screens.

FORM_FEED




Description

Form feed character in the system character set

Notes

This character is typically used in files. It can be used in connection
with the READ DATASET and TRANSFER statements as well as the
CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how
to treat this character in RFCs, with procedures or statements such as
WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is
especially relevant to the conversion between EBCDIC and ACSII.

This character cannot be displayed on ABAP lists or screens.

BACKSPACE

Description

Backspace character in system character set

Notes

You can use this character in connection with the DATASET and TRANSFER

statements, as well as the CL_ABAP_CONV classes.

At the time of the creation of this documentation, it is unspecified how

to treat this character in RFCs, with procedures or statements such as

WS_DOWNLOAD, GUI_DOWNLOAD, or TRANSLATE ... CODE PAGE; this is

especially relevant to the conversion between EBCDIC and ACSII.

This character cannot be displayed on ABAP lists or screens.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The class CL_ABAP_CHAR_UTILITIES provides attributes and methods that affect the properties of single characters. The components of this class are all static and public. The attributes are write-protected and are initialized in the class constructor method.

Regards

Former Member
0 Kudos

Hi,

for new line

CL_ABAP_CHAR_UTILITIES=>NEWLINE

if its with carriage return

CL_ABAP_CHAR_UTILITIES=>CR_LF

Goto Se24 and give the Class name and Press display to know the all options ..

Look at the below link

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/content.htm

Former Member
0 Kudos

Hi

This class is used for the Utilities for Processing Characters

The components of this class are utilities for the processing of characters.

goto that class in SE24

goto methods, Attributes

select that method

and see the documentation of the Method,attribute from the Menu

Reward points for useful Answers

Regards

Anji