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

Number conversion issue

Former Member
0 Likes
871

Hi all.

I have the following code with me:

data:w_s1 type c,

w_q1_act_rec1(14) type c,

W_q LIKE EKPO-MENGE.

w_s1 = '-'.

w_q = '52352.900'.

write w_q to w_q1

concatenate w_s1 w_q1 into W_Q1.

condense W_Q1.

W_Q = W_Q1.

when i execute the above code I get the following short dump:

The program attempted to interpret the value "- 52,352.900 " as a number, but

since the value contravenes the rules for correct number formats,

this was not possible.

the program is giving me a dump when I am insertinf w_Q1's value to W_Q.

As far as I know W_Q should hold -ve sign.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
837

Hi rajatg,

you can achieve your desired result just with the following, you don't need the concatenation for the sign.


data: W_q LIKE EKPO-MENGE.
w_q = '52352.900'.
w_q = - w_q.

Edited by: gzervas on Dec 13, 2010 4:33 PM

7 REPLIES 7
Read only

Former Member
0 Likes
837

Hi,

I don't understand. What are you trying to do?

Regards

Read only

0 Likes
837

this is the code that we aleady have and now we are getting the short dump in production somehow.

Read only

Former Member
0 Likes
838

Hi rajatg,

you can achieve your desired result just with the following, you don't need the concatenation for the sign.


data: W_q LIKE EKPO-MENGE.
w_q = '52352.900'.
w_q = - w_q.

Edited by: gzervas on Dec 13, 2010 4:33 PM

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
837

Basically you want add a negation sign in front of quantity .

w_q1_act_rec1(14) type c,

W_q LIKE EKPO-MENGE.

There is type mismatch here.

Read only

Former Member
0 Likes
837

Hi,

Menge does not support negative values and i think the weight can´t be negative........... right?

The data element BSTMG - Domain MENG13 - 13,3.

MENGEV supports that..

Read only

Former Member
0 Likes
837

This is exactly the same question you asked earlier and marked as answered.

What exactly is the proble,??

Rob

Read only

0 Likes
837

Hi Rob,

I did that by mistake... the issue has been solved now.

Thanks for the help.