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: 

Need to remove E+00 exponent format from price field type F

Former Member
0 Kudos

Hello,

I have price field of type F. I don't want E+00 format in the field and more over i want to restrict to 2 decimals only.

Please help me.

Thanks,

Ashok

6 REPLIES 6

Former Member
0 Kudos

Hi,

Use this FM MURC_ROUND_FLOAT_TO_PACKED.

0 Kudos

Hello,

I am BW consultant. We have result_package internal table in end routine. By using FM FM MURC_ROUND_FLOAT_TO_PACKED, i can change it 2 decimals but at the end i have to modify result_package back to same field in that internal table.

So again i am getting E+00.

Please help me.

Thanks,

Ashok

0 Kudos

Hi Ashok,

You can replicate the internal table to a temporary internal table and then you can manipulate the same for calculations. From the temporary internal table you can either modify the main internal table or can free the table after calculations.

Hope this logic will help. For the rest of the question you already have the answer.

Thanks,

Samantak.

Former Member
0 Kudos

Hi,

Try this ,


DATA: var type f,
           var1 type p decimals 2.
 
var = 75 / 100.
 
WRITE:/ var.

move var to var1.

WRITE:/ var1.

Var1 will hold the value as per your requirement.

Regards,

Vikranth

0 Kudos

Hi Vikranth,

Here at the end i have to modify result_package using var1 to same field type F. So i am getting E+00.

Thanks for quick response.

Ashok

0 Kudos

Hello Ashok,

I dont think its possible to convert a type f variable again to the same type without exponential form. You may have to change the type declaration of your result_package to either type p or c to have the result with 2 decimals and without exponential form.

Regards,

Vikranth