cancel
Showing results for 
Search instead for 
Did you mean: 

'%_'-initial values in CL_ABAP_CHAR_UTILITIES

Former Member
0 Kudos

Hello friends,

Just a matter of interest:

in CL_ABAP_CHAR_UTILITIES the initial values for attributes are defined like %_CR_LF . Is that a special kind of variable definition ? if i try to get information on that initial value, i get the message '%_CR_LF does not exist' (??). Where is it set, if it's not defined ? How can it work ( it does, that's no doubt ), if it's not defined ?

Any information would be usefull.

Regards Wolfgang

Accepted Solutions (1)

Accepted Solutions (1)

former_member188685
Active Contributor
0 Kudos

Hi,

This is HEXA decimal representation. it's value is '##'

if you want to check this(copy+paste).

report ztest.

write: CL_ABAP_CHAR_UTILITIES=>CR_LF.

regards

vijay

Former Member
0 Kudos

Hi vijay,

thank you for your answer. It's clear how to get the contents of this attribute. But still my question remains - where are these values defined ?

Hello, the question is stilll open, any ideas ?

Message was edited by: Wolfgang Valtin

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Wolfgang,

Did you happen to get the exact explanation to your question. I too have the same question as you do.

The answers in the thread point more to the usage of '%_' values than explaining its fundamental existence in ABAP.

Please share in case you have any details available.

Thanks,

Himanshu

Former Member
0 Kudos

Hi wolfgang,

1.

%_NEWLINE

%_HORIZONTAL_TAB

2. These are all CONSTANTS

defined in the CLASS DEFINITION.

3. in se24, open this class,

4. Then, use the menu

GOTO --> PUBLIC SECTION

5. THERE u will find the defintion.

ype-pools ABAP .

constants BYTE_ORDER_MARK_LITTLE type ABAP_BYTE_ORDER_MARK

value 'FFFE' .

constants BYTE_ORDER_MARK_BIG type ABAP_BYTE_ORDER_MARK value 'FEFF'

.

constants BYTE_ORDER_MARK_UTF8 type ABAP_BYTE_ORDER_UTF8

value 'EFBBBF' .

constants CHARSIZE type I value %_CHARSIZE .

constants ENDIAN type ABAP_ENDIAN value %_ENDIAN .

constants MINCHAR type ABAP_CHAR1 value %_MINCHAR .

constants MAXCHAR type ABAP_CHAR1 value %_MAXCHAR .

constants HORIZONTAL_TAB type ABAP_CHAR1 value %_HORIZONTAL_TAB .

constants VERTICAL_TAB type ABAP_CHAR1 value %_VERTICAL_TAB .

constants NEWLINE type ABAP_CHAR1 value %_NEWLINE .

constants CR_LF type ABAP_CR_LF value %_CR_LF .

constants FORM_FEED type ABAP_CHAR1 value %_FORMFEED .

constants BACKSPACE type ABAP_CHAR1 value %_BACKSPACE .

6. To make ur own defintion,

try this code :

7.

report abc.

type-pools : abap.

data : a type ABAP_CHAR1 value %_NEWLINE.

write 😕 a.

regards,

amit m.

Former Member
0 Kudos

Thank you, Amit ,

this helps a bit. But:

A notation like '%_CR_LF' is a symbolic notation. I think, it has to be defined somewhere - guess that it's filled with codepage values during system start. Is there any documentation on this '%_'-Values - may be that there are some more than in the CL_ABAP_CHAR_UTILITIES (??)

Regards Wolfgang

Former Member
0 Kudos

Hi again,

1. It seems to be a part of ABAP Syntax itself.

2. Bcos

we can simply write this program.

3.

report abc.

data : a type c value %_NEWLINE.

write 😕 a.

4.

NOTE :

However, if we write like this

report abc.

data : a type c value %_NEWLINE.

a = %_NEWLINE. <----


NOT ALLOWED

write 😕 a.

(it gives error, not at the time of syntax check,

but compilation)

regards,

amit m.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Here is the sample code which uses the same for tab delimited output.

constants c_tab TYPE abap_char1

VALUE cl_abap_char_utilities=>horizontal_tab.

CONCATENATE w_final-pernr l_betrg INTO w_output

SEPARATED BY c_tab.