Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Char to Numc or Date

Former Member
0 Kudos

I need to knw how to convert a char var to integer or numerical variable. If possible ,dats format.

Reply imm

6 REPLIES 6

Former Member
0 Kudos

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

abdul_hakim
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

depending on your char value, the addition

USING EDIT MASK

of the statement WRITE might be a solution ... Just an idea ...!

--MIKE

Former Member
0 Kudos

Hi,

U can use move , write or just assign it to the

required variables.

Regards,

GSR.

former_member188685
Active Contributor
0 Kudos
REPORT  ZTEST                               .


data: char(10),
date type sy-datum.
char = '20041212'. "yyyymmdd

write char to date mm/dd/yyyy.

write date.

Former Member
0 Kudos

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.