2006 Jan 05 9:50 AM
I need to knw how to convert a char var to integer or numerical variable. If possible ,dats format.
Reply imm
2006 Jan 05 9:54 AM
Hi Jayasree,
Just have a varaible declared of the required type (integer or dats format)
and say, move char_field to variable.
See the documentation for command MOVE.
Regards,
Raj
2006 Jan 05 9:56 AM
hi ABAP supports automatic type conversion for all data types except you cannot assign type t to type d field and vice versa.
eg.converting character to integer!!
data a(3) type c value '123'
data b type i.
b = a.
write b.
2006 Jan 05 10:01 AM
depending on your char value, the addition
USING EDIT MASK
of the statement WRITE might be a solution ... Just an idea ...!
--MIKE
2006 Jan 05 10:03 AM
Hi,
U can use move , write or just assign it to the
required variables.
Regards,
GSR.
2006 Jan 05 10:03 AM
REPORT ZTEST .
data: char(10),
date type sy-datum.
char = '20041212'. "yyyymmdd
write char to date mm/dd/yyyy.
write date.
2006 Jan 05 10:05 AM
hi
if you take a numc data type then you can move the char value to the numc stright.
if it is dats u can do a move char_variable to dats_variable.
regards.
Lakshmikanth.