07-23-2009 11:40 AM
Hi Experts,
DATA: A TYPE C VALUE 'A',
B TYPE C VALUE 'B'.
Expected Output:
C = A
B
I want to concatenate A and B into C and after concatenate looking for above expected output.
No expecting
C = AB or A B
Edited by: Rajneesh Gupta on Jul 23, 2009 12:40 PM
Edited by: Rajneesh Gupta on Jul 23, 2009 12:41 PM
07-23-2009 11:54 AM
HI,
Can you explain the purpose of your requirment?
Do you have to write the data on 2 separate line?
Regards,
Ankur Parab
07-23-2009 12:06 PM
Yes, I am having data in 2 different variables and and I have one text field where i have to pass the both variables values in line break like A
B
Rajneesh
07-23-2009 12:11 PM
do one thing.
declare C as a table with one field.
pass A in first row and B in second
07-23-2009 12:15 PM
Hi Rjneesh,
Which Data Type r u using for Variable C.
I thnk u can use cl_abap_char_utilities=>newline which prakash has specified earlier ,Else if C is a table u can do it easily.
Regards,
Lakshman.
07-23-2009 11:56 AM
use separated by cl_abap_char_utilities=>newline with concat statement
07-23-2009 12:24 PM
Hi Rajneesh,
Try this code
CONSTANTS: c_delimiter(1) TYPE c VALUE cl_abap_char_utilities=>newline
CONCATENATE A B INTO C SEPERATED BY C_DELIMITER.
Regards
Milan