05-18-2006 3:28 PM
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
05-18-2006 3:31 PM
05-18-2006 3:31 PM
05-18-2006 3:34 PM
if you want the hexa decimal value then
data: newline(2) TYPE x VALUE <b>'0D0A'.</b>
Regards
vijay
05-18-2006 3:50 PM
One more remark: CL_ABAP_CHAR_UTILITIES=>NEWLINE works fine in Unicode (and non-unicode). I'm not sure about the others.
Peter
05-18-2006 3:31 PM
05-18-2006 3:33 PM
Hi,
You can use '/'(forward slash).
Thanks and Regards,
Bharat Kumar Reddy.V
05-18-2006 3:33 PM
Hi Chemmanz,
the new line character in abap is '/'.
regards,
keerthi.
05-18-2006 3:34 PM
hi,
the new line character is '/' or
CL_ABAP_CHAR_UTILITIES=>NEWLINE
hope this helps,
priya.
05-18-2006 3: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
09-07-2010 12:21 PM
hi,
can u please explain in detail about
CL_ABAP_CHAR_UTILITIES=>NEWLINE
regards,
P.Sandeep
05-18-2006 3:34 PM
05-18-2006 3: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
05-18-2006 3: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
08-21-2007 9:03 AM
Hi,
I have tried both,But the problem with NEWLINE is ,it is generating one additional blank line and CR_LF is displaying # and | .Could you please suggest any solution to this.
Thanks!
Regards,
Shweta
08-13-2009 10:15 AM
Finally - I managed to Do it.
If you want the string to be in same cell - but alt+enter separted then keep the String in Quotes - "String".
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE
in p_text
WITH CL_ABAP_CHAR_UTILITIES=>CR_LF.
CONCATENATE '"'
p_text
'"'
INTO p_text.
It worked for me. ALL THE BEST.
06-25-2010 3:18 PM
You may use: CONCATENATE .... SEPARATED BY '<B.R>' .
delete '.' from 'B.R'
best regards,
Sergiu Iatco
Edited by: Iatco Sergiu on Jun 25, 2010 4:19 PM
Edited by: Iatco Sergiu on Jun 25, 2010 4:20 PM
03-04-2011 1:46 PM
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