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

Reg. Decimal Points

Former Member
0 Likes
565

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
Read only

vinod_vemuru2
Active Contributor
0 Likes
533

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
Read only

Former Member
0 Likes
533

create a variable like this



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

Read only

vinod_vemuru2
Active Contributor
0 Likes
534

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.

Read only

Former Member
0 Likes
533

Thanks for your response.

Problem solved.

Hope you got your points.

Thanks,

Sakthi