01-12-2006 9:38 AM
Hi folks,
Iam facing some problem with the formatting of a field used in the Print program of a SAP script.
I have a floating point number 1.6785E2. I want to convert it to the form 167.85 including the commas. i.e. for example the value is 1.234567E5, then i want the output as '12,345.67'. Any FM or means to acheive this ?
Thanks and Regards,
Vijay
01-12-2006 9:51 AM
Hi vijay,
1. in the sapscript layout,
use
&MYNUMBER(E3)&
2. from help.
Syntax
&symbol(EN)&
If you specify an exponent of 0, then the number is displayed without using the exponent representation. This has the same effect as completely omitting the specification of an exponent: &symbol(E0)& has the same effect as &symbol(E)&
In this example, the PLMK-SOLLWERT field is assumed to have the value 123456.78 and to be of data type FLTP.
&PLMK-SOLLWERT& -> 1.23456780000000E05
&PLMK-SOLLWERT(E3)& -> 123.456780000000E03
&PLMK-SOLLWERT(E6)& -> 0.12345678000000E06
&PLMK-SOLLWERT(E0)& -> +123456.780000000
&PLMK-SOLLWERT(E)& -> +123456.780000000
regards,
amit m.
01-12-2006 9:53 AM
01-12-2006 9:56 AM
Hi Amit and Nagarajan,
Thanks for the prompt replies. I shall try them out and get back to you.
Warm Regards,
Vijay