‎2008 Jul 10 11:34 PM
Hi Experts,
I have a field that is of string data type. I am filling the string by concatenating some PO texts . Now I need to induce a new line in between the data based on a condition.
Or in other words i want to start some partof data on next line.
How can i do this?
thanks
Dan
‎2008 Jul 10 11:42 PM
Try concatenating the line feed cl_abap_char_utilities=>CR_LF
in your string.
‎2008 Jul 10 11:42 PM
Try concatenating the line feed cl_abap_char_utilities=>CR_LF
in your string.
‎2008 Jul 11 12:21 AM
Hello Dan,
You can use cl_abap_char_utilities=>CR_LF utility class variable in your logic. We used this in our project.
Thanks,
Greetson
‎2008 Jul 11 1:09 AM
Hi,
Thanks .
How do i make use of this class to make the data start from the second (new) line.
Can you please gimme a sample code?
Thanks
Dan
‎2008 Jul 11 1:10 AM
To add a new line you can use:
data: text type string.
data: l_newline type c value cl_abap_char_utilities=>newline.
concatenate 'Use new line' l_newline 'here.' into text.
So you have:
Use new line
here.
‎2008 Jul 11 2:58 PM
Hi Alvaro Achin,
Its not working:
In output, i am getting Use new line #here.
i need it as :
Use new line
here.
‎2008 Jul 11 3:49 PM
Hello Dan,
Try to make use of the FM's:
CONVERT_STRING_TO_TABLE
LXE_COMMON_XSTRING_TO_TABLE
G_BOOL_CONVERT_STRING_TO_TABLE
SWA_STRING_TO_TABLE
SWDP_STRING_TO_TABLE
C14W_STRING_TO_TLINE
We used the FM "C14W_STRING_TO_TLINE" in our projects. This will automatically split line by line and append into an internal table.
Thanks,
Greetson
‎2008 Jul 11 3:54 PM
In the debugger and list output it will look like "#" but if you download it to an ASCII file it will have a newline.
I don't think you can add new line in many features of abap (like messages)
‎2008 Jul 11 4:26 PM
Dear Experts,
I am doing forms actually. I need to see it in a PDF layout .
thanks
Dan