Application Development and Automation 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: 
Read only

run time error

Former Member
0 Likes
1,018

Hi,

In my program I have a field called LGPLA with data type char.It is having values 01-01-01

01-01-03

01-01-04

01-01-06

01-02-01.When I try to execute the program it is giving run time error as 'Unable to interpret "01-01-06 " as a number'.

Can anyone suggest me asolution for this?

9 REPLIES 9
Read only

Former Member
0 Likes
992

Hi,

change the data type as string...

Read only

0 Likes
992

That's a standard field cannot be changed to string. It is storage bin

Read only

Former Member
0 Likes
992

Hi,

If the field type is C then it should not happen.

Is it that value to this field is passed from some other field.

Juct check or Debug once again.

Hope this helps!!!

Regards,

Lalit

Read only

former_member70391
Contributor
0 Likes
992

Hi ,

It is working fine for me. I hope that you are passing this value into some integer data type and it is throwing error.

Please check ur code.

data: char1(8) type c value '01-01-06'.

write: char1.

Thanks & Regards,

Nagaraj kalbavi

Read only

Former Member
0 Likes
992

01-01-06 " as a number'.

i hope you are doing some calculations or some operations on that filed , thinking that it is number.

so try to convert that to number or check your code once

what are you doing exactly let me know..

if possible show the code where it caused the dump.

Read only

Former Member
0 Likes
992

Hi abap developer,

Can i see the part of the code where you are getting this run time error.

Thanks,

Sai

Read only

Former Member
0 Likes
992

LGPLA is a CHAR 10 field.

you're error must be where you're trying to move it to is likely a N, P or F type, basically anything but a type C.

Since we have no code to look at.. best I can suggest.

Read only

Former Member
0 Likes
992

U might be comparing this char variable with a field of type P ..

data : v_LGPLA(10) value '01-01-06'.

data : v_p type p decimals 2 .

if v_LGPLA = v_p. <-- it will give a dump here

endif.

Read only

Former Member
0 Likes
992

Hi the data element is a char type and of length 10. I assume you are using this data element as a numeric field in your program. ( which it is not able to interpret as a a numeric field). Check the usage of this field or data element in your program.