2008 Apr 03 5:05 PM
Hi,
I want to concatenate two strings in a single one, and there shoule be gap of two lines between those two strings.
example I want to concatenate string1 and string2 in string3, then after concatenate the string3 should have value as shown below:
string1
string2
I have tried all the attributes of class CL_ABAP_CHAR_UTILITIES but it doesnt helped.
Kindly suggest.
Regards,
Neerup
2008 Apr 03 5:22 PM
Look at the code:
DATA: lv_string1 TYPE string VALUE 'string1',
lv_string2 TYPE string VALUE 'string2',
lv_string3 TYPE string.
CONCATENATE lv_string1
cl_abap_char_utilities=>cr_lf
cl_abap_char_utilities=>cr_lf cl_abap_char_utilities=>cr_lf
lv_string2
INTO lv_string3.
WRITE lv_string3.
When you now download this list (save to local file) and open it in notepad, you will notice that it has three empty lines between the first and the second string.
The code is ok, however, you're requirement might not be clear to me.
2008 Apr 03 5:22 PM
Look at the code:
DATA: lv_string1 TYPE string VALUE 'string1',
lv_string2 TYPE string VALUE 'string2',
lv_string3 TYPE string.
CONCATENATE lv_string1
cl_abap_char_utilities=>cr_lf
cl_abap_char_utilities=>cr_lf cl_abap_char_utilities=>cr_lf
lv_string2
INTO lv_string3.
WRITE lv_string3.
When you now download this list (save to local file) and open it in notepad, you will notice that it has three empty lines between the first and the second string.
The code is ok, however, you're requirement might not be clear to me.
2008 Apr 03 5:40 PM
2008 Apr 03 5:49 PM
Neerup Sarkar, Not possible to have lines in string. String always one line It can contain N of characters. Thanks, Venkat.O