Skip to Content

Which is the NewLine Character in ABAP ??

Hi All,

Can anyone tell me the new-line character in ABAP.

Ex:

In C or C++ '\n' is the newline character.

ie if i print 'Tom\nJerry' in C\C++ the o/p will be

Tom

Jerry

I am looking for it's equivalent in ABAP.

Thanks in Advance

Chemmanz

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

9 Answers

  • Best Answer
    May 18, 2006 at 02:31 PM

    You can use CL_ABAP_CHAR_UTILITIES=>NEWLINE.

    Peter

    Add comment
    10|10000 characters needed characters exceeded

  • May 18, 2006 at 02:31 PM

    hi,

    it is equal to CL_ABAP_CHAR_UTILITIES=>NEWLINE or

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:33 PM

    Hi,

    You can use '/'(forward slash).

    Thanks and Regards,

    Bharat Kumar Reddy.V

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:33 PM

    Hi Chemmanz,

    the new line character in abap is '/'.

    regards,

    keerthi.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:34 PM

    hi,

    the new line character is '/' or

    CL_ABAP_CHAR_UTILITIES=>NEWLINE

    hope this helps,

    priya.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:34 PM

    Hi,

    CL_ABAP_CHAR_UTILITIES=>NEWLINE

    For Example:

    Input: lv_string1 = 'ABC', lv_string2 = 'XYZ'

    eg:Concatenate : lv_string1 CL_ABAP_CHAR_UTILITIES=>NEWLINE lv_string2 INTO lv_string.

    lv_string will

    look like this:

    'ABC

    XYZ'

    rgds,

    latheesh

    Message was edited by: Latheesh Kaduthara

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:34 PM

    / is the new line character in ABAP

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:36 PM

    Hi Chemmanz,

    U can use NEW-LINE.

    This terminates the current list line and moves the cursor to the next list line.

    Rgds,

    Prakashsingh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2006 at 02:40 PM

    Hi Mate,

    Use these attributes:

    CL_ABAP_CHAR_UTILITIES=>NEWLINE

    CL_ABAP_CHAR_UTILITIES=>CR_LF

    removed by moderator - don't ask for points!

    Edited by: Jan Stallkamp on Mar 4, 2011 3:11 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi fellows,

      I am also facing the similar issue in printing the standard text maintained in SO10. I've tried all the solutions but could not generate the required output. in my case it is still printing "#". Can anyone suggest the way out.

      I am reading the text in the internal table and concatenating the lines in to string variable. how shall i handle the format column to generate the new line while printing the string in the smartform text.

      Thanks,

      Janisar