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: 

Set decemal place

Former Member
0 Kudos

Hi gurus,

Actually I retive the data from table MBEW - VERPR field,I want display the price Like 1000.000 .(After decimal we need three zeros)

It shows that two decemal like 1000.00,

How can set as three decemal ..

1 ACCEPTED SOLUTION

former_member182485
Active Contributor
0 Kudos

while populating fieldcatalog

Data: wa_fcatalog type slis_filter_alv0

wa_fcatalog-decimals = '3'.

this will set the decimal points to 3.

Regards

Bikas

6 REPLIES 6

former_member182485
Active Contributor
0 Kudos

while populating fieldcatalog

Data: wa_fcatalog type slis_filter_alv0

wa_fcatalog-decimals = '3'.

this will set the decimal points to 3.

Regards

Bikas

0 Kudos

Thanks for u r reply,

But I need three decemal place for that perticular field only.

How can set wa_ficatlog-decemal = 3 for that field only..

0 Kudos

Hi,

That field only means is it fo one column or one row field. If it is one column then it is possible.

After getting field catelog do like this.

READ i_fcatlog INTO wa_fcatlog WITH KEY fieldname = ur field name.

wa_fcatalog-decimals = '3'.

MODIFY i_fcatlog FROM wa_fcatlog TRANSPORTING decimals.

Thanks,

Vinod.

Former Member
0 Kudos

data : var(15) type p deimals 3.

var = MBEW - VERPR .

It will work.

Implement in your code.

Regards,

madan.

former_member673464
Active Contributor
0 Kudos

hi,

The number of decimals depends on the currency you are displaying or unit of quantity you are displaying.It will automatically display with corresponding decimals.If you want to display the number with three decimals you can use the write to statement for it.

Regards,

Veeresh

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

If u r using clasical report then do like this.

WRITE: MBEW - VERPR DECIMALS 3.

If u r using ALV report then u can pass the number of decimals in fieldcat for this field.

Thanks,

Vinod.