cancel
Showing results for 
Search instead for 
Did you mean: 

Error With New Line Character : CL_ABAP_CHAR_UTILITIES=>NEWLINE

Former Member
0 Kudos

Hello Experts

I am trying to use 'CL_ABAP_CHAR_UTILITIES=>NEWLINE' to show data in next line. but its showing # not next line.

CONCATENATE

        'line1'

        CL_ABAP_CHAR_UTILITIES=>NEWLINE

        'line2'

        CL_ABAP_CHAR_UTILITIES=>NEWLINE

        'line3'

        CL_ABAP_CHAR_UTILITIES=>NEWLINE

INTO text_buffer.

and now binding text_buffer with Textview. but

expected output.

line1

line2

line3..

but output is coming

line1#line2#line3.

Accepted Solutions (1)

Accepted Solutions (1)

patrick1905
Explorer
0 Kudos

Hi Chandra,

I recently had the same problem.

The problem can be fixed by implementing SAP Note 1797388 on a unicode system. If your systems happens to be NON-Unicode, check note 1813468.

Regards,

Patrick

Answers (7)

Answers (7)

navdeep_thakur12
Explorer
0 Kudos

Hi

check in debugging

if hex value for # is 000D

then use:

REPLACE ALL OCCURANCE OF cl_abap_char_utilities=>cr_lf(1) IN string WITH space.

if hex value is 000A

then use:

REPLACE ALL OCCURANCE OF cl_abap_char_utilities=>cr_lf+1(1) IN string WITH space.

similary you can check for HORIZONTAL_TAB, VERTICAL_TAB etc.

hope this help

Regards

Former Member
0 Kudos

Try to use in this way    

CONCATENATE    'line1'    'line2'   'line3'   INTO text_buffer seperated by CL_ABAP_CHAR_UTILITIES=>NEWLINE.

Phani

Former Member
0 Kudos

Hello All,

Thanks for suggestion..

I got to know there is some issue with the class in my system. I need to implement some Notes to make it work. Once i will implement the particular note i will share with all that note.

Is there some other way to achieve this without using CL_ABAP_CHAR_UTILITIES   class.

Former Member
0 Kudos

Hi Chandra,

I have the same issue. Can you please suggest if your problem is resolved. Please post the solution.

Thanks in Advance

Arvind Patel

Former Member
0 Kudos

no its was not working for me, but once we have done SP updates after that its working fine. You do one thing contact your Basic person and ask them to use the updated SP(support Pack).

There is no other way to the same thing in a single variable.

BR

Chandra..

Former Member
0 Kudos

Hello Arvind,

Try to implement SAP Note 1797388 ..

here is the process how to implement

T code : /osnote

Download Sap Note (Ctrl+F8)

Insert the note then  Execute (F8).

expand the New node and click above the latest downloaded note and click on Implement SAP note (Ctrl+F1)

BR
Chandra..:)

former_member230486
Contributor
0 Kudos

Hi Chandra Shekar,

Do you want to display the data into application server file? If yes it will work as you have written.

Former Member
0 Kudos

Dear Chandra,

  on TextView element it should work. Please, could you try to concatenate the parameter &sap-language=EN on the URL?

Regards

Former Member
0 Kudos

Hi Shekhar,

I have implemented the same code. Its working fine in my system.

former_member213217
Participant
0 Kudos

Hi Chandra,

I tried the exact same code & it works fine for me. Try giving it a try with

cl_abap_char_utilities=>cr_lf instead of CL_ABAP_CHAR_UTILITIES=>NEWLINE. If it doesn't resolve the issue try using the same code with a disabled textEdit UI element instead of a TextView.

Regards,

Uday

former_member182387
Active Participant
0 Kudos

Hi Uday,

  Thanks. Your answer helped. Instead of SAP notes, we can use this.

Former Member
0 Kudos

Dear, SAP notes is used here to make your CL_ABAP_CHAR_UTILITIES class functionality working,not for any code.