03-29-2008 1:18 PM
Hi
According to following link .. I tried to concatenate line break in string concatenation
and my code is like this... I'm on ECC6
DATA: line_br(2) TYPE X VALUE '0D0A'.
DATA: v_line TYPE string.
CONCATENATE 'LINE1' 'LINE2' INTO v_line SEPARATED BY line_br.
"But I'm getting syntax error like line_br must be a character-type object
"any other solution please...???
03-29-2008 1:21 PM
Hi Perez,
Declare the variable line_br as character data type. CONCATENATE statement will allow type c, n,string.
DATA: line_br(4) TYPE c VALUE 'ODOA'.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Mar 29, 2008 6:51 PM
03-29-2008 1:24 PM
thank you for reply vinod...
If i define line_br as CHAR
then my output is like this...
LINE10DLINE2
but I want like this..
LINE1
LINE2.
03-29-2008 1:24 PM
hi ,
do like this ..it is not allowed with type x..
DATA: line_br(4) TYPE c VALUE '0Aew'.
DATA: v_line TYPE string.
CONCATENATE 'LINE1' 'LINE2' INTO v_line SEPARATED BY line_br.
write:/ v_line .
regards,
venkat.
03-29-2008 7:36 PM
Hi Perez,
on unicode systems, starting with ECC600 all SAP systems, you must use attributes of class CL_ABAP_CHAR_UTILITIES. Look at the attributes of this class and use what you need,
CONCATENATE 'LINE1' 'LINE2' INTO v_line SEPARATED BY cl_abap_char_utilities=>cr_lf.
should do it.
Regards,
Clemens
03-29-2008 8:43 PM
Hi ,
Please use the declaration as follows.
DATA: v_NEWLINE(2) TYPE X VALUE '0D0A' (4.6c)
4.7 and 7.0
data: l_cr(1) type c value cl_abap_char_utilites=>cr_lf,
l_lf(1) type c value cl_abap_char_utilities=>linefeed.
Regards,
Venkat
03-23-2011 3:15 AM
Just to share...
I was using a fm: FITP_POPUP_TO_INFORM, which I intended to pass in a string with linefeed.
On examination, the FM deletes away my linefeed (cl_abap_char_utilities=>cr_lf).
I found a substitile with vertical tab (cl_abap_char_utilities=>cr_vertical_tab).
Works just as well.