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

Output Decimals

Former Member
0 Likes
655

I am displaying the data in ALV format, for displaying the iam using the gs-fieldcatalog-cfieldname, but for one currency it has zero decimals and the data in bseg-RDIF2 is 40.50, but due to the cfieldname it is displaying as 4050. But I need this to be displayed as 40.50 only, I need to use cfieldname also.

Please let me know is there any other solution for this?

Is there any calculations to be done to achieve this?

Thanks,

Pavan

7 REPLIES 7
Read only

Former Member
0 Likes
616

Declare a varible in packed with decimals 2 points and pass the currency into this varible.And display this varible in ur output.

Regards

Read only

Former Member
0 Likes
616

hi,

Customize field catalog,

 when 'NETWR'.
.....
  field_cat-edit_mask = '____.__'.
......
  endif.

It sets two decimals for the value you passed.

Regards,

Sailaja.

Read only

0 Likes
616

HI,

Please let me know whether it will the amount as 40.50, and should I use cfieldname also?

Thanks,

Pavan.

Read only

Former Member
0 Likes
616

hi,

Give Cfieldname also when using edit_mask.

REgards,

Sailaja.

Read only

0 Likes
616

Hi,

I changed as per your suggestion, still it is not displaying, if possible can u me some code?

Thanks,

Pavan.

Read only

anversha_s
Active Contributor
0 Likes
616

hi pavan,

i sugestion.

divide the value by 100.

then show that value in the ouput of ALV.

rgds

anver

Read only

0 Likes
616

Hi,

If I divide it by 100 it is displaying as 40 only.

Is there any other method to do it?

Thanks,

Pavan.