2007 Jul 19 5:33 PM
Hi,
i want to convert a numeric type field to character type field in ABAP,
and also i want to concatenate some set of different types of field to a character type field at last
if i give just like this
<b>CONCATENATE ' ' it_pa0000-pernr it_pa0105-usrid ' ' it_pa0105-begda into record_tab-string.</b>
it remove space out from the string i need space also in the <b>record_tab-string</b>,
Reg,
Hariharan
2007 Jul 19 5:35 PM
Use like this
Ex:CONCATENATE num1 num2 num3 into num SEPARATED BY SPACE.
Regards,
SaiRam
2007 Jul 19 5:49 PM
Hi,
data : char(10) type c,
num(10) type n.
write num to char. " to convert num to char type..
and use SEPERATED BY SPACE in the concatenate statment to get the space after each field.
thanks
mahesh
2007 Jul 19 5:49 PM
Hi,
The CONCATENATE statement combines two or more separate strings into one.
<b>CONCATENATE <c1> ... <cn> INTO <c> [SEPARATED BY <s>].</b>
This statement concatenates the character fields <c1> to <cn> and assigns the result to <c>. The system ignores spaces at the end of the individual source strings.
The addition SEPARATED BY <s> allows you to specify a character field <s> which is placed in its defined length between the individual fields.
try with this sample code..........
CONCATENATE it_pa0000-pernr it_pa0105-usrid it_pa0105-begda INTO record_tab-string SEPARATED BY SPACE.
regards,
Ashok Reddy
2007 Jul 19 6:00 PM
Dump all the datatype values into chracter values..
data: char1 type char20,
char2 type char20.
char1 = num1.
char2 = num2.
CONCATENATE char1 char2 SEPERATED by space.
2007 Jul 20 6:07 AM
hi guys,
what you guys told is correct but i need a more than one space in between two variable in concade operator,
str1 = 'Hari'.
str2 = 'Hariharan'
concatenate str1 ' ' str2 ' ' into str3.
i need str3 just like this
str3 = 'Hari Hariharan '
Reg,
Hariharan