09-10-2009 5:10 AM
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
09-10-2009 5:15 AM
09-10-2009 5:22 AM
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
09-10-2009 5:28 AM
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.
09-10-2009 5:19 AM
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
09-10-2009 5:26 AM
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
09-10-2009 5:56 AM
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