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: 

converting decimals values in the quantity fields

spandana_babu
Participant
0 Kudos

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

former_member386202
Active Contributor
0 Kudos

Hi,

Just define ur variable as p with 0 decimals.

Ex. Data : lv_qunty type p decimals 0.

Regards,

Prashant

6 REPLIES 6

former_member386202
Active Contributor
0 Kudos

Hi,

Just define ur variable as p with 0 decimals.

Ex. Data : lv_qunty type p decimals 0.

Regards,

Prashant

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

Hi Anand,

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

Regards,

Satish

Former Member
0 Kudos

Hi,

Do as below :

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

data : result type i.

result = val.

write result.

Thanks,

Sriram Ponna.