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

Conversion Character format to Quantity format

Former Member
0 Likes
769

Hi Friends,

while i am converting character format to quantity format it is going to dump.

l_wa_item-target_qty = <l_fs_items_ch>-ktmng.

here target_qty is quantity type

and

ktmng type char17

please help me how can convert character to quantity format.

Thanks & Regards,

K.Nagaraju,

8100661740.

5 REPLIES 5
Read only

Former Member
0 Likes
693

what does you dump say? Do you verify that your characters contain only digits and decimal and sign before you do the compute?

Read only

0 Likes
693

Error Analysis:

  • procedure "USER_COMMAND" "(FORM)", nor was it propagated by a RAISING

*Since the caller of the procedure could not have anticipated that the

*exception would occur, the current program is terminated.

*The reason for the exception is:

*The program attempted to interpret the value "10,000 " as a number, b

*since the value contravenes the rules for correct number formats,

this was not possible.

Thanks a Regards.

K.nagaraju,

8100661740

Read only

0 Likes
693

>

> *The program attempted to interpret the value "10,000 " as a number, b

> *since the value contravenes the rules for correct number formats,

> this was not possible.

I don't see why that passage is so difficult to understand.

I'll help you out:

>

> correct number formats

Read only

0 Likes
693

Hi,

check following code.

data : c(10) type c,

p(11) type p decimals 3.

c = '123456.789'.

p = c.

write 😕 c, p.

Read only

0 Likes
693

You really must learn to do some desk checking before posting here. The code you posted works perfectly!

However, if you change it to:

DATA : c(10) TYPE c,
p(11) TYPE p DECIMALS 3.

c = '123,456.789'.

p = c.

WRITE :/ c, p.

It will dump. And it will give the same sort of message (but with a different number) than the one you originally said.

Rob