Skip to Content

'%_'-initial values in CL_ABAP_CHAR_UTILITIES

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Feb 10, 2006 at 10:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2006 at 12:21 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Wolfgang Valtin

      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.

  • Posted on Feb 15, 2006 at 11:12 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2011 at 07:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.