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: 

Reg. Decimal Points

Former Member
0 Kudos

Hi Experts,

In my output I have amount values like this 7000.4800. Actually my requirement is to display the output like 7000.48 I dont need the last two decimal points.

How to delete the last two decimal points in the output. Is there any function module or any simple ways to go. Any data element exists with decimal 2 points if so please send your answer.

Thanks,

Sakthi

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

If u are using write statement then use decimals addition.

eg: WRITE: /1 wa_final-currency DECIMALS 2.

If u are using ALV then modify the fieldcat for this column by passing decimals equal to 2.

Thanks,

Vinod.

3 REPLIES 3

Former Member
0 Kudos

create a variable like this



data: var type p decimals 2." restricts decimals to 2.

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

If u are using write statement then use decimals addition.

eg: WRITE: /1 wa_final-currency DECIMALS 2.

If u are using ALV then modify the fieldcat for this column by passing decimals equal to 2.

Thanks,

Vinod.

Former Member
0 Kudos

Thanks for your response.

Problem solved.

Hope you got your points.

Thanks,

Sakthi