11-08-2006 1:19 PM
Hi Friends,
How do I concatenate two strings separated by a new-line.
I mean I want a variable having two strings that are concatenated by next line.
Regards,
Raju.
11-08-2006 1:27 PM
AFAIK there is not special character like '\n' in ABAP. perhaps this a solution:
CONCATENATE string1
string2
INTO string3
SEPARATED BY special_string.
SPLIT string3
AT special_string
INTO TABLE itab.
LOOP AT itab INTO line.
WRITE: / line.
ENDLOOP.
11-08-2006 1:27 PM
AFAIK there is not special character like '\n' in ABAP. perhaps this a solution:
CONCATENATE string1
string2
INTO string3
SEPARATED BY special_string.
SPLIT string3
AT special_string
INTO TABLE itab.
LOOP AT itab INTO line.
WRITE: / line.
ENDLOOP.
11-08-2006 1:44 PM
Thanks for the reply.
But I have a different problem.
Iam using ALV Grid. And I want to display the title with multiple lines.
For Example:
<b>BOM Changes
Change Number: 500000.
Board Number : Board1.
Plant : Plant1.</b>
And Iam using classes. I mean Iam using set_table_for_first_table to display the ALV Grid.
11-08-2006 1:45 PM
11-08-2006 1:39 PM
HI Raju
Please check class: CL_ABAP_CHAR_UTILITIES.
data: l_cr(1) type c value cl_abap_char_utilites=>cr_lf,
l_lf(1) type c value cl_abap_char_utilities=>linefeed.
One of the above will certainly help you. Am not on SAP now to check the same. Use this for concatenating.
CONCATENATE str1 str2 INTO out SEPARATED BY l_cr.
Kind Regards
Eswar