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

converting decimals values in the quantity fields

Former Member
0 Likes
1,058

Hi Guru's

hw t o remove the decimal values in the quantity field.....

i want onl y numeric value

ex: i/p : 1483.00

o/p : 1483

Regards

Anand.N

1 ACCEPTED SOLUTION
Read only

former_member386202
Active Contributor
0 Likes
1,034

Hi,

Just define ur variable as p with 0 decimals.

Ex. Data : lv_qunty type p decimals 0.

Regards,

Prashant

Hi Guru's

hw t o remove the decimal values in the quantity field.....

i want onl y numeric value

ex: i/p : 1483.00

o/p : 1483

Regards

Anand.N

6 REPLIES 6
Read only

former_member386202
Active Contributor
0 Likes
1,035

Hi,

Just define ur variable as p with 0 decimals.

Ex. Data : lv_qunty type p decimals 0.

Regards,

Prashant

Read only

Former Member
0 Likes
1,034

Hi Anand,

do like this

Data: Var1(10) type p decimals 2 value '1483.00',
         Var2 type i.

Var2 = Var1.
write var2.

Reward Points if this helps,

Satish

Read only

0 Likes
1,034

Hi

thanks for u r response,

But i am retriving data from database tables

quantity field declared in the form fo standard table filed.

then hw can i approach.

Regards

Anand .N

Read only

0 Likes
1,034

Hi,

in Internal table declare field with 0 decimals..

check this..


DATA : BEGIN OF itab OCCURS 0,
menge(16) type p decimals 0, "in EKPO menge is qty field
END OF itab.

SELECT menge INTO CORRESPONDING FIELDS OF TABLE itab FROM ekpo.

Message was edited by:

Perez C

Read only

0 Likes
1,034

Hi Anand,

then you need to use FM CONVERSION_EXIT_ALPHA_INPUT or CONVERSION_EXIT_ALPHA_OUTPUT on that field.

Regards,

Satish

Read only

Former Member
0 Likes
1,034

Hi,

Do as below :

data : val type p decimals 2 value '100.00'.

data : result type i.

result = val.

write result.

Thanks,

Sriram Ponna.