‎2014 Jan 13 9:52 AM
Hi
I am tring to put a new line into a string template
data: lv_text type string.
lv_text = | Bond, James Bond \n | && | How do you do? |.
write: lv_text.
But apparently 'write' does not support this kind of new line.
Any idea how to to smuggle the new line into string template
so it works with 'write'?
Thank you
regards
Yuval
‎2014 Jan 13 10:06 AM
Hi Yuval,
Try with CL_ABAP_CHAR_UTILITIES=>NEWLINE.
e.g.
concatenate 'Bond, James Bond' CL_ABAP_CHAR_UTILITIES=>NEWLINE
'How do you do? ' into lv_text.
Thanks
Deependra
‎2014 Jan 13 10:49 AM
I don't thing so that CL_ABAP_CHAR_UTILITIES=>NEWLINE will work with "Write"..
‎2014 Jan 13 11:05 AM
Hi
The point is you do not need concatenate any
more once you switch to string templates
rgds
yuval
‎2014 Jan 13 10:07 AM
Hi
Try to use '/' to skip line or
CL_ABAP_CHAR_UTILITIES=>NEWLINE
‎2014 Jan 13 10:13 AM
I guess you will need some programming for WRITE "list" output.
SPLIT AT ' \n' .. => WRITE
‎2014 Jan 13 10:32 AM
\n is the RegEx character for line-feed(LF).
The ABAP list processor cannot identify this character & displays the replacement character # instead. But if you view the variable(in debug mode) in HTML view you can see the line break.
BR,
Suhas
‎2014 Jan 13 12:22 PM
Hi
Apparently it does not work in report.
It does however work in screen and in
web dynpro.
Thank you
regards
Yuval